Use path_put() in a few places instead of {mnt,d}put()
[sfrench/cifs-2.6.git] / fs / afs / mntpt.c
index e13cea2206693d9831b93db3271a0938db64e8a9..a3510b8ba3e71365c078bf14ca20fcdefe62c6ed 100644 (file)
@@ -235,8 +235,7 @@ 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:
-               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,