Merge commit 'v2.6.30' into for-2.6.31
[safe/jmp/linux-2.6] / fs / afs / mntpt.c
index e13cea2..2b9e2d0 100644 (file)
@@ -173,9 +173,9 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
        if (PageError(page))
                goto error;
 
-       buf = kmap(page);
+       buf = kmap_atomic(page, KM_USER0);
        memcpy(devname, buf, size);
-       kunmap(page);
+       kunmap_atomic(buf, KM_USER0);
        page_cache_release(page);
        page = NULL;
 
@@ -232,11 +232,10 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
        }
 
        mntget(newmnt);
-       err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts);
+       err = do_add_mount(newmnt, &nd->path, MNT_SHRINKABLE, &afs_vfsmounts);
        switch (err) {
        case 0:
-               dput(nd->path.dentry);
-               mntput(nd->path.mnt);
+               path_put(&nd->path);
                nd->path.mnt = newmnt;
                nd->path.dentry = dget(newmnt->mnt_root);
                schedule_delayed_work(&afs_mntpt_expiry_timer,
@@ -284,11 +283,3 @@ void afs_mntpt_kill_timer(void)
        cancel_delayed_work(&afs_mntpt_expiry_timer);
        flush_scheduled_work();
 }
-
-/*
- * begin unmount by attempting to remove all automounted mountpoints we added
- */
-void afs_umount_begin(struct vfsmount *vfsmnt, int flags)
-{
-       shrink_submounts(vfsmnt, &afs_vfsmounts);
-}