mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
lift path_put(path) to callers of __do_follow_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
d231412db6
commit
258fa99905
1 changed files with 2 additions and 2 deletions
|
@ -644,8 +644,6 @@ static __always_inline int __do_follow_link(struct path *path, struct nameidata
|
||||||
if (dentry->d_inode->i_op->put_link)
|
if (dentry->d_inode->i_op->put_link)
|
||||||
dentry->d_inode->i_op->put_link(dentry, nd, cookie);
|
dentry->d_inode->i_op->put_link(dentry, nd, cookie);
|
||||||
}
|
}
|
||||||
path_put(path);
|
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,6 +670,7 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
|
||||||
current->total_link_count++;
|
current->total_link_count++;
|
||||||
nd->depth++;
|
nd->depth++;
|
||||||
err = __do_follow_link(path, nd);
|
err = __do_follow_link(path, nd);
|
||||||
|
path_put(path);
|
||||||
current->link_count--;
|
current->link_count--;
|
||||||
nd->depth--;
|
nd->depth--;
|
||||||
return err;
|
return err;
|
||||||
|
@ -1864,6 +1863,7 @@ do_link:
|
||||||
if (error)
|
if (error)
|
||||||
goto exit_dput;
|
goto exit_dput;
|
||||||
error = __do_follow_link(&path, &nd);
|
error = __do_follow_link(&path, &nd);
|
||||||
|
path_put(&path);
|
||||||
if (error) {
|
if (error) {
|
||||||
/* Does someone understand code flow here? Or it is only
|
/* Does someone understand code flow here? Or it is only
|
||||||
* me so stupid? Anathema to whoever designed this non-sense
|
* me so stupid? Anathema to whoever designed this non-sense
|
||||||
|
|
Loading…
Reference in a new issue