Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Bricked
flo
Commits
844a3917
Commit
844a3917
authored
14 years ago
by
Al Viro
Browse files
Options
Download
Email Patches
Plain Diff
nothing in do_follow_link() is going to see RCU
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
795abaf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
fs/namei.c
fs/namei.c
+7
-8
No files found.
fs/namei.c
View file @
844a3917
...
...
@@ -668,9 +668,6 @@ force_reval_path(struct path *path, struct nameidata *nd)
return
0
;
if
(
!
status
)
{
/* Don't d_invalidate in rcu-walk mode */
if
(
nameidata_drop_rcu
(
nd
))
return
-
ECHILD
;
d_invalidate
(
dentry
);
status
=
-
ESTALE
;
}
...
...
@@ -777,6 +774,8 @@ __do_follow_link(const struct path *link, struct nameidata *nd, void **p)
int
error
;
struct
dentry
*
dentry
=
link
->
dentry
;
BUG_ON
(
nd
->
flags
&
LOOKUP_RCU
);
touch_atime
(
link
->
mnt
,
dentry
);
nd_set_link
(
nd
,
NULL
);
...
...
@@ -811,6 +810,11 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
{
void
*
cookie
;
int
err
=
-
ELOOP
;
/* We drop rcu-walk here */
if
(
nameidata_dentry_drop_rcu_maybe
(
nd
,
path
->
dentry
))
return
-
ECHILD
;
if
(
current
->
link_count
>=
MAX_NESTED_LINKS
)
goto
loop
;
if
(
current
->
total_link_count
>=
40
)
...
...
@@ -1419,9 +1423,6 @@ exec_again:
goto
out_dput
;
if
(
inode
->
i_op
->
follow_link
)
{
/* We commonly drop rcu-walk here */
if
(
nameidata_dentry_drop_rcu_maybe
(
nd
,
next
.
dentry
))
return
-
ECHILD
;
BUG_ON
(
inode
!=
next
.
dentry
->
d_inode
);
err
=
do_follow_link
(
&
next
,
nd
);
if
(
err
)
...
...
@@ -1467,8 +1468,6 @@ last_component:
break
;
if
(
inode
&&
unlikely
(
inode
->
i_op
->
follow_link
)
&&
(
lookup_flags
&
LOOKUP_FOLLOW
))
{
if
(
nameidata_dentry_drop_rcu_maybe
(
nd
,
next
.
dentry
))
return
-
ECHILD
;
BUG_ON
(
inode
!=
next
.
dentry
->
d_inode
);
err
=
do_follow_link
(
&
next
,
nd
);
if
(
err
)
...
...
This diff is collapsed.
Click to expand it.
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