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
07681481
Commit
07681481
authored
Apr 18, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
link_path_walk: split "return from recursive call" path
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
32cd7468
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
23 deletions
+17
-23
fs/namei.c
fs/namei.c
+17
-23
No files found.
fs/namei.c
View file @
07681481
...
@@ -1826,23 +1826,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
...
@@ -1826,23 +1826,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
last
->
name
=
name
;
last
->
name
=
name
;
name
=
s
;
name
=
s
;
goto
start
;
goto
start
;
back:
name
=
last
->
name
;
if
(
unlikely
(
err
))
{
put_link
(
nd
,
&
last
->
link
,
last
->
cookie
);
current
->
link_count
--
;
nd
->
depth
--
;
last
--
;
goto
Err
;
}
else
{
err
=
walk_component
(
nd
,
LOOKUP_FOLLOW
);
put_link
(
nd
,
&
last
->
link
,
last
->
cookie
);
current
->
link_count
--
;
nd
->
depth
--
;
last
--
;
goto
Walked
;
}
}
}
}
}
if
(
!
d_can_lookup
(
nd
->
path
.
dentry
))
{
if
(
!
d_can_lookup
(
nd
->
path
.
dentry
))
{
...
@@ -1852,13 +1835,24 @@ static int link_path_walk(const char *name, struct nameidata *nd)
...
@@ -1852,13 +1835,24 @@ static int link_path_walk(const char *name, struct nameidata *nd)
}
}
terminate_walk
(
nd
);
terminate_walk
(
nd
);
Err:
Err:
if
(
likely
(
!
nd
->
depth
))
while
(
unlikely
(
nd
->
depth
))
{
put_link
(
nd
,
&
last
->
link
,
last
->
cookie
);
current
->
link_count
--
;
nd
->
depth
--
;
last
--
;
}
return
err
;
return
err
;
goto
back
;
OK:
OK:
if
(
likely
(
!
nd
->
depth
))
if
(
unlikely
(
nd
->
depth
))
{
name
=
last
->
name
;
err
=
walk_component
(
nd
,
LOOKUP_FOLLOW
);
put_link
(
nd
,
&
last
->
link
,
last
->
cookie
);
current
->
link_count
--
;
nd
->
depth
--
;
last
--
;
goto
Walked
;
}
return
0
;
return
0
;
goto
back
;
}
}
static
int
path_init
(
int
dfd
,
const
struct
filename
*
name
,
unsigned
int
flags
,
static
int
path_init
(
int
dfd
,
const
struct
filename
*
name
,
unsigned
int
flags
,
...
...
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