Commit 1a1a1a75 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Linus Torvalds

afs: mntput called before dput

dput must be called before mntput here.
Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
Acked-By: default avatarDavid Howells <dhowells@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a2e08551
......@@ -235,8 +235,8 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd)
err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts);
switch (err) {
case 0:
mntput(nd->mnt);
dput(nd->dentry);
mntput(nd->mnt);
nd->mnt = newmnt;
nd->dentry = dget(newmnt->mnt_root);
schedule_delayed_work(&afs_mntpt_expiry_timer,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment