afs: mntput called before dput
[pandora-kernel.git] / fs / afs / mntpt.c
index a3684dc..6f8c96f 100644 (file)
@@ -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,