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
086e183a
Commit
086e183a
authored
Feb 22, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pull dropping RCU on success of link_path_walk() into path_lookupat()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
16c2cd71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
fs/namei.c
fs/namei.c
+12
-18
No files found.
fs/namei.c
View file @
086e183a
...
...
@@ -539,14 +539,6 @@ static int nameidata_drop_rcu_last(struct nameidata *nd)
return
-
ECHILD
;
}
/* Try to drop out of rcu-walk mode if we were in it, otherwise do nothing. */
static
inline
int
nameidata_drop_rcu_last_maybe
(
struct
nameidata
*
nd
)
{
if
(
likely
(
nd
->
flags
&
LOOKUP_RCU
))
return
nameidata_drop_rcu_last
(
nd
);
return
0
;
}
/**
* release_open_intent - free up open intent resources
* @nd: pointer to nameidata
...
...
@@ -1339,7 +1331,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
while
(
*
name
==
'/'
)
name
++
;
if
(
!*
name
)
goto
return_base
;
return
0
;
if
(
nd
->
depth
)
lookup_flags
=
LOOKUP_FOLLOW
|
(
nd
->
flags
&
LOOKUP_CONTINUE
);
...
...
@@ -1448,7 +1440,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
}
else
follow_dotdot
(
nd
);
}
goto
return_base
;
return
0
;
}
err
=
do_lookup
(
nd
,
&
this
,
&
next
,
&
inode
);
if
(
err
)
...
...
@@ -1471,13 +1463,10 @@ static int link_path_walk(const char *name, struct nameidata *nd)
if
(
!
nd
->
inode
->
i_op
->
lookup
)
break
;
}
goto
return_base
;
return
0
;
lookup_parent:
nd
->
last
=
this
;
nd
->
last_type
=
type
;
return_base:
if
(
nameidata_drop_rcu_last_maybe
(
nd
))
return
-
ECHILD
;
return
0
;
out_dput:
if
(
!
(
nd
->
flags
&
LOOKUP_RCU
))
...
...
@@ -1598,10 +1587,15 @@ static int path_lookupat(int dfd, const char *name,
if
(
nd
->
flags
&
LOOKUP_RCU
)
{
/* RCU dangling. Cancel it. */
nd
->
flags
&=
~
LOOKUP_RCU
;
nd
->
root
.
mnt
=
NULL
;
rcu_read_unlock
();
br_read_unlock
(
vfsmount_lock
);
if
(
!
retval
)
{
if
(
nameidata_drop_rcu_last
(
nd
))
retval
=
-
ECHILD
;
}
else
{
nd
->
flags
&=
~
LOOKUP_RCU
;
nd
->
root
.
mnt
=
NULL
;
rcu_read_unlock
();
br_read_unlock
(
vfsmount_lock
);
}
}
if
(
!
retval
)
...
...
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