diff options
author | Al Viro <viro@www.linux.org.uk> | 2005-06-07 00:36:01 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-07 01:42:24 +0400 |
commit | 1be4a0900be5d2c2fd9cd012e3a153e1ea47b96a (patch) | |
tree | e743475f1ff0e078bda6bc8555bfc5b9fb8b4097 /fs/namei.c | |
parent | d73ffe16b8baafae6e9249acee6b50c24099c6de (diff) | |
download | linux-1be4a0900be5d2c2fd9cd012e3a153e1ea47b96a.tar.xz |
[PATCH] namei fixes (5/19)
fix for too early mntput() in open_namei() - we pin path.mnt down for the
duration of __do_follow_link(). Otherwise we could get the fs where our
symlink lived unmounted while we were in __do_follow_link(). That would end
up with dentry of symlink staying pinned down through the fs shutdown.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index e42f7c35545a..020fb8c8d1cd 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; |