aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/namei.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index e42f7c35545..020fb8c8d1c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1524,8 +1524,10 @@ do_link:
error = security_inode_follow_link(path.dentry, nd);
if (error)
goto exit_dput;
+ mntget(path.mnt);
error = __do_follow_link(path.dentry, nd);
dput(path.dentry);
+ mntput(path.mnt);
path.mnt = nd->mnt;
if (error)
return error;