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
Kirill Smelkov
linux
Commits
bcce56d5
Commit
bcce56d5
authored
Sep 10, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
... and fold the renamed __vfs_follow_link() into its only caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
aac34df1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
24 deletions
+14
-24
fs/namei.c
fs/namei.c
+14
-24
No files found.
fs/namei.c
View file @
bcce56d5
...
@@ -660,29 +660,6 @@ static __always_inline void set_root_rcu(struct nameidata *nd)
...
@@ -660,29 +660,6 @@ static __always_inline void set_root_rcu(struct nameidata *nd)
}
}
}
}
static
__always_inline
int
__follow_link
(
struct
nameidata
*
nd
,
const
char
*
link
)
{
int
ret
;
if
(
IS_ERR
(
link
))
goto
fail
;
if
(
*
link
==
'/'
)
{
set_root
(
nd
);
path_put
(
&
nd
->
path
);
nd
->
path
=
nd
->
root
;
path_get
(
&
nd
->
root
);
nd
->
flags
|=
LOOKUP_JUMPED
;
}
nd
->
inode
=
nd
->
path
.
dentry
->
d_inode
;
ret
=
link_path_walk
(
link
,
nd
);
return
ret
;
fail:
path_put
(
&
nd
->
path
);
return
PTR_ERR
(
link
);
}
static
void
path_put_conditional
(
struct
path
*
path
,
struct
nameidata
*
nd
)
static
void
path_put_conditional
(
struct
path
*
path
,
struct
nameidata
*
nd
)
{
{
dput
(
path
->
dentry
);
dput
(
path
->
dentry
);
...
@@ -874,7 +851,20 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
...
@@ -874,7 +851,20 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
error
=
0
;
error
=
0
;
s
=
nd_get_link
(
nd
);
s
=
nd_get_link
(
nd
);
if
(
s
)
{
if
(
s
)
{
error
=
__follow_link
(
nd
,
s
);
if
(
unlikely
(
IS_ERR
(
s
)))
{
path_put
(
&
nd
->
path
);
put_link
(
nd
,
link
,
*
p
);
return
PTR_ERR
(
s
);
}
if
(
*
s
==
'/'
)
{
set_root
(
nd
);
path_put
(
&
nd
->
path
);
nd
->
path
=
nd
->
root
;
path_get
(
&
nd
->
root
);
nd
->
flags
|=
LOOKUP_JUMPED
;
}
nd
->
inode
=
nd
->
path
.
dentry
->
d_inode
;
error
=
link_path_walk
(
s
,
nd
);
if
(
unlikely
(
error
))
if
(
unlikely
(
error
))
put_link
(
nd
,
link
,
*
p
);
put_link
(
nd
,
link
,
*
p
);
}
}
...
...
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