summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-08-09 01:32:02 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-16 20:16:43 +0300
commit258fa99905f704afed1a43f195bc5235a56fb895 (patch)
tree434bd55b08ab3f635e66cce89e3ab931dbc9f2ef /fs
parentd231412db66355e72d606f8403ee8b6bd8ad4f9a (diff)
downloadlinux-258fa99905f704afed1a43f195bc5235a56fb895.tar.xz
lift path_put(path) to callers of __do_follow_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 87f97ba90ad1..30c61c298b4c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -644,8 +644,6 @@ static __always_inline int __do_follow_link(struct path *path, struct nameidata
if (dentry->d_inode->i_op->put_link)
dentry->d_inode->i_op->put_link(dentry, nd, cookie);
}
- path_put(path);
-
return error;
}
@@ -672,6 +670,7 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
current->total_link_count++;
nd->depth++;
err = __do_follow_link(path, nd);
+ path_put(path);
current->link_count--;
nd->depth--;
return err;
@@ -1864,6 +1863,7 @@ do_link:
if (error)
goto exit_dput;
error = __do_follow_link(&path, &nd);
+ path_put(&path);
if (error) {
/* Does someone understand code flow here? Or it is only
* me so stupid? Anathema to whoever designed this non-sense