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
ef7562d5
Commit
ef7562d5
authored
Mar 04, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make handle_dots() leave RCU mode on error
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
4455ca62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
fs/namei.c
fs/namei.c
+12
-11
No files found.
fs/namei.c
View file @
ef7562d5
...
@@ -1052,7 +1052,7 @@ static int follow_dotdot_rcu(struct nameidata *nd)
...
@@ -1052,7 +1052,7 @@ static int follow_dotdot_rcu(struct nameidata *nd)
seq
=
read_seqcount_begin
(
&
parent
->
d_seq
);
seq
=
read_seqcount_begin
(
&
parent
->
d_seq
);
if
(
read_seqcount_retry
(
&
old
->
d_seq
,
nd
->
seq
))
if
(
read_seqcount_retry
(
&
old
->
d_seq
,
nd
->
seq
))
return
-
ECHILD
;
goto
failed
;
inode
=
parent
->
d_inode
;
inode
=
parent
->
d_inode
;
nd
->
path
.
dentry
=
parent
;
nd
->
path
.
dentry
=
parent
;
nd
->
seq
=
seq
;
nd
->
seq
=
seq
;
...
@@ -1065,8 +1065,14 @@ static int follow_dotdot_rcu(struct nameidata *nd)
...
@@ -1065,8 +1065,14 @@ static int follow_dotdot_rcu(struct nameidata *nd)
}
}
__follow_mount_rcu
(
nd
,
&
nd
->
path
,
&
inode
,
true
);
__follow_mount_rcu
(
nd
,
&
nd
->
path
,
&
inode
,
true
);
nd
->
inode
=
inode
;
nd
->
inode
=
inode
;
return
0
;
return
0
;
failed:
nd
->
flags
&=
~
LOOKUP_RCU
;
nd
->
root
.
mnt
=
NULL
;
rcu_read_unlock
();
br_read_unlock
(
vfsmount_lock
);
return
-
ECHILD
;
}
}
/*
/*
...
@@ -1405,9 +1411,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
...
@@ -1405,9 +1411,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
* parent relationships.
* parent relationships.
*/
*/
if
(
unlikely
(
type
!=
LAST_NORM
))
{
if
(
unlikely
(
type
!=
LAST_NORM
))
{
err
=
handle_dots
(
nd
,
type
);
if
(
handle_dots
(
nd
,
type
))
if
(
err
)
return
-
ECHILD
;
goto
return_err
;
continue
;
continue
;
}
}
...
@@ -1441,12 +1446,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
...
@@ -1441,12 +1446,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
nd
->
flags
&=
lookup_flags
|
~
LOOKUP_CONTINUE
;
nd
->
flags
&=
lookup_flags
|
~
LOOKUP_CONTINUE
;
if
(
lookup_flags
&
LOOKUP_PARENT
)
if
(
lookup_flags
&
LOOKUP_PARENT
)
goto
lookup_parent
;
goto
lookup_parent
;
if
(
unlikely
(
type
!=
LAST_NORM
))
{
if
(
unlikely
(
type
!=
LAST_NORM
))
err
=
handle_dots
(
nd
,
type
);
return
handle_dots
(
nd
,
type
);
if
(
err
)
goto
return_err
;
return
0
;
}
err
=
do_lookup
(
nd
,
&
this
,
&
next
,
&
inode
);
err
=
do_lookup
(
nd
,
&
this
,
&
next
,
&
inode
);
if
(
err
)
if
(
err
)
break
;
break
;
...
...
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