Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
258fa999
Commit
258fa999
authored
Aug 09, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lift path_put(path) to callers of __do_follow_link()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d231412d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fs/namei.c
fs/namei.c
+2
-2
No files found.
fs/namei.c
View file @
258fa999
...
...
@@ -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 @@ struct file *do_filp_open(int dfd, const char *pathname,
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment