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
ff326a32
Commit
ff326a32
authored
5 years ago
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
open_last_lookups(): move complete_walk() into do_open()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b94e0b32
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
fs/namei.c
fs/namei.c
+8
-10
No files found.
fs/namei.c
View file @
ff326a32
...
@@ -3128,10 +3128,7 @@ static const char *open_last_lookups(struct nameidata *nd,
...
@@ -3128,10 +3128,7 @@ static const char *open_last_lookups(struct nameidata *nd,
if
(
nd
->
last_type
!=
LAST_NORM
)
{
if
(
nd
->
last_type
!=
LAST_NORM
)
{
if
(
nd
->
depth
)
if
(
nd
->
depth
)
put_link
(
nd
);
put_link
(
nd
);
res
=
handle_dots
(
nd
,
nd
->
last_type
);
return
handle_dots
(
nd
,
nd
->
last_type
);
if
(
likely
(
!
res
))
res
=
ERR_PTR
(
complete_walk
(
nd
));
return
res
;
}
}
if
(
!
(
open_flag
&
O_CREAT
))
{
if
(
!
(
open_flag
&
O_CREAT
))
{
...
@@ -3196,13 +3193,9 @@ static const char *open_last_lookups(struct nameidata *nd,
...
@@ -3196,13 +3193,9 @@ static const char *open_last_lookups(struct nameidata *nd,
if
(
nd
->
depth
)
if
(
nd
->
depth
)
put_link
(
nd
);
put_link
(
nd
);
res
=
step_into
(
nd
,
WALK_TRAILING
,
dentry
,
inode
,
seq
);
res
=
step_into
(
nd
,
WALK_TRAILING
,
dentry
,
inode
,
seq
);
if
(
unlikely
(
res
))
{
if
(
unlikely
(
res
))
nd
->
flags
&=
~
(
LOOKUP_OPEN
|
LOOKUP_CREATE
|
LOOKUP_EXCL
);
nd
->
flags
&=
~
(
LOOKUP_OPEN
|
LOOKUP_CREATE
|
LOOKUP_EXCL
);
return
res
;
return
res
;
}
/* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */
return
ERR_PTR
(
complete_walk
(
nd
));
}
}
/*
/*
...
@@ -3216,6 +3209,11 @@ static int do_open(struct nameidata *nd,
...
@@ -3216,6 +3209,11 @@ static int do_open(struct nameidata *nd,
int
acc_mode
;
int
acc_mode
;
int
error
;
int
error
;
if
(
!
(
file
->
f_mode
&
(
FMODE_OPENED
|
FMODE_CREATED
)))
{
error
=
complete_walk
(
nd
);
if
(
error
)
return
error
;
}
if
(
!
(
file
->
f_mode
&
FMODE_CREATED
))
if
(
!
(
file
->
f_mode
&
FMODE_CREATED
))
audit_inode
(
nd
->
name
,
nd
->
path
.
dentry
,
0
);
audit_inode
(
nd
->
name
,
nd
->
path
.
dentry
,
0
);
if
(
open_flag
&
O_CREAT
)
{
if
(
open_flag
&
O_CREAT
)
{
...
...
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