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
3343eb82
Commit
3343eb82
authored
Dec 24, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shift releasing nd->root from do_last() to its caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
fb1cc555
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
fs/namei.c
fs/namei.c
+2
-6
No files found.
fs/namei.c
View file @
3343eb82
...
@@ -1685,8 +1685,6 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
...
@@ -1685,8 +1685,6 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
}
}
filp
=
nameidata_to_filp
(
nd
);
filp
=
nameidata_to_filp
(
nd
);
mnt_drop_write
(
nd
->
path
.
mnt
);
mnt_drop_write
(
nd
->
path
.
mnt
);
if
(
nd
->
root
.
mnt
)
path_put
(
&
nd
->
root
);
if
(
!
IS_ERR
(
filp
))
{
if
(
!
IS_ERR
(
filp
))
{
error
=
ima_file_check
(
filp
,
acc_mode
);
error
=
ima_file_check
(
filp
,
acc_mode
);
if
(
error
)
{
if
(
error
)
{
...
@@ -1726,8 +1724,6 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
...
@@ -1726,8 +1724,6 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
if
(
S_ISDIR
(
path
->
dentry
->
d_inode
->
i_mode
))
if
(
S_ISDIR
(
path
->
dentry
->
d_inode
->
i_mode
))
goto
exit
;
goto
exit
;
filp
=
finish_open
(
nd
,
open_flag
,
flag
,
acc_mode
);
filp
=
finish_open
(
nd
,
open_flag
,
flag
,
acc_mode
);
if
(
nd
->
root
.
mnt
)
path_put
(
&
nd
->
root
);
return
filp
;
return
filp
;
exit_mutex_unlock:
exit_mutex_unlock:
...
@@ -1737,8 +1733,6 @@ exit_dput:
...
@@ -1737,8 +1733,6 @@ exit_dput:
exit:
exit:
if
(
!
IS_ERR
(
nd
->
intent
.
open
.
file
))
if
(
!
IS_ERR
(
nd
->
intent
.
open
.
file
))
release_open_intent
(
nd
);
release_open_intent
(
nd
);
if
(
nd
->
root
.
mnt
)
path_put
(
&
nd
->
root
);
path_put
(
&
nd
->
path
);
path_put
(
&
nd
->
path
);
return
ERR_PTR
(
error
);
return
ERR_PTR
(
error
);
}
}
...
@@ -1857,6 +1851,8 @@ do_last:
...
@@ -1857,6 +1851,8 @@ do_last:
pathname
,
dir
,
&
is_link
);
pathname
,
dir
,
&
is_link
);
if
(
is_link
)
if
(
is_link
)
goto
do_link
;
goto
do_link
;
if
(
nd
.
root
.
mnt
)
path_put
(
&
nd
.
root
);
return
filp
;
return
filp
;
ok:
ok:
...
...
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