Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
10fa8e62
Commit
10fa8e62
authored
Dec 26, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify exits in O_CREAT handling
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9e67f361
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
fs/namei.c
fs/namei.c
+13
-17
No files found.
fs/namei.c
View file @
10fa8e62
...
@@ -1821,9 +1821,8 @@ reval:
...
@@ -1821,9 +1821,8 @@ reval:
nd
.
flags
|=
LOOKUP_REVAL
;
nd
.
flags
|=
LOOKUP_REVAL
;
error
=
path_walk
(
pathname
,
&
nd
);
error
=
path_walk
(
pathname
,
&
nd
);
if
(
error
)
{
if
(
error
)
{
if
(
nd
.
root
.
mnt
)
filp
=
ERR_PTR
(
error
);
path_put
(
&
nd
.
root
);
goto
out
;
return
ERR_PTR
(
error
);
}
}
if
(
unlikely
(
!
audit_dummy_context
()))
if
(
unlikely
(
!
audit_dummy_context
()))
audit_inode
(
pathname
,
nd
.
path
.
dentry
);
audit_inode
(
pathname
,
nd
.
path
.
dentry
);
...
@@ -1847,9 +1846,7 @@ reval:
...
@@ -1847,9 +1846,7 @@ reval:
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
if
(
!
filp
)
if
(
!
filp
)
goto
do_link
;
goto
do_link
;
if
(
nd
.
root
.
mnt
)
goto
out
;
path_put
(
&
nd
.
root
);
return
filp
;
exit_dput:
exit_dput:
path_put_conditional
(
&
path
,
&
nd
);
path_put_conditional
(
&
path
,
&
nd
);
...
@@ -1857,9 +1854,15 @@ exit_dput:
...
@@ -1857,9 +1854,15 @@ exit_dput:
release_open_intent
(
&
nd
);
release_open_intent
(
&
nd
);
exit_parent:
exit_parent:
path_put
(
&
nd
.
path
);
path_put
(
&
nd
.
path
);
filp
=
ERR_PTR
(
error
);
out:
if
(
nd
.
root
.
mnt
)
if
(
nd
.
root
.
mnt
)
path_put
(
&
nd
.
root
);
path_put
(
&
nd
.
root
);
return
ERR_PTR
(
error
);
if
(
filp
==
ERR_PTR
(
-
ESTALE
)
&&
!
force_reval
)
{
force_reval
=
1
;
goto
reval
;
}
return
filp
;
do_link:
do_link:
error
=
-
ELOOP
;
error
=
-
ELOOP
;
...
@@ -1887,13 +1890,8 @@ do_link:
...
@@ -1887,13 +1890,8 @@ do_link:
* with "intent.open".
* with "intent.open".
*/
*/
release_open_intent
(
&
nd
);
release_open_intent
(
&
nd
);
if
(
nd
.
root
.
mnt
)
filp
=
ERR_PTR
(
error
);
path_put
(
&
nd
.
root
);
goto
out
;
if
(
error
==
-
ESTALE
&&
!
force_reval
)
{
force_reval
=
1
;
goto
reval
;
}
return
ERR_PTR
(
error
);
}
}
nd
.
flags
&=
~
LOOKUP_PARENT
;
nd
.
flags
&=
~
LOOKUP_PARENT
;
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
...
@@ -1901,9 +1899,7 @@ do_link:
...
@@ -1901,9 +1899,7 @@ do_link:
__putname
(
nd
.
last
.
name
);
__putname
(
nd
.
last
.
name
);
if
(
!
filp
)
if
(
!
filp
)
goto
do_link
;
goto
do_link
;
if
(
nd
.
root
.
mnt
)
goto
out
;
path_put
(
&
nd
.
root
);
return
filp
;
}
}
/**
/**
...
...
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