aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/namei.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 37fcf941fa3f..5153f57ee6b3 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1501,11 +1501,8 @@ do_last:
1501 1501
1502 if (__follow_mount(&path)) { 1502 if (__follow_mount(&path)) {
1503 error = -ELOOP; 1503 error = -ELOOP;
1504 if (flag & O_NOFOLLOW) { 1504 if (flag & O_NOFOLLOW)
1505 dput(path.dentry); 1505 goto exit_dput;
1506 mntput(path.mnt);
1507 goto exit;
1508 }
1509 } 1506 }
1510 error = -ENOENT; 1507 error = -ENOENT;
1511 if (!path.dentry->d_inode) 1508 if (!path.dentry->d_inode)
@@ -1530,8 +1527,7 @@ ok:
1530exit_dput: 1527exit_dput:
1531 dput(path.dentry); 1528 dput(path.dentry);
1532 if (nd->mnt != path.mnt) 1529 if (nd->mnt != path.mnt)
1533 mntput(nd->mnt); 1530 mntput(path.mnt);
1534 nd->mnt = path.mnt;
1535exit: 1531exit:
1536 path_release(nd); 1532 path_release(nd);
1537 return error; 1533 return error;