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
c99687a0
Commit
c99687a0
authored
Mar 03, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fold path_to_nameidata() into its only remaining caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
84f0cd9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
fs/namei.c
fs/namei.c
+6
-13
No files found.
fs/namei.c
View file @
c99687a0
...
@@ -860,18 +860,6 @@ static int set_root(struct nameidata *nd)
...
@@ -860,18 +860,6 @@ static int set_root(struct nameidata *nd)
return
0
;
return
0
;
}
}
static
inline
void
path_to_nameidata
(
const
struct
path
*
path
,
struct
nameidata
*
nd
)
{
if
(
!
(
nd
->
flags
&
LOOKUP_RCU
))
{
dput
(
nd
->
path
.
dentry
);
if
(
nd
->
path
.
mnt
!=
path
->
mnt
)
mntput
(
nd
->
path
.
mnt
);
}
nd
->
path
.
mnt
=
path
->
mnt
;
nd
->
path
.
dentry
=
path
->
dentry
;
}
static
int
nd_jump_root
(
struct
nameidata
*
nd
)
static
int
nd_jump_root
(
struct
nameidata
*
nd
)
{
{
if
(
unlikely
(
nd
->
flags
&
LOOKUP_BENEATH
))
if
(
unlikely
(
nd
->
flags
&
LOOKUP_BENEATH
))
...
@@ -1705,7 +1693,12 @@ static const char *step_into(struct nameidata *nd, int flags,
...
@@ -1705,7 +1693,12 @@ static const char *step_into(struct nameidata *nd, int flags,
((
flags
&
WALK_TRAILING
)
&&
!
(
nd
->
flags
&
LOOKUP_FOLLOW
))
||
((
flags
&
WALK_TRAILING
)
&&
!
(
nd
->
flags
&
LOOKUP_FOLLOW
))
||
(
flags
&
WALK_NOFOLLOW
))
{
(
flags
&
WALK_NOFOLLOW
))
{
/* not a symlink or should not follow */
/* not a symlink or should not follow */
path_to_nameidata
(
&
path
,
nd
);
if
(
!
(
nd
->
flags
&
LOOKUP_RCU
))
{
dput
(
nd
->
path
.
dentry
);
if
(
nd
->
path
.
mnt
!=
path
.
mnt
)
mntput
(
nd
->
path
.
mnt
);
}
nd
->
path
=
path
;
nd
->
inode
=
inode
;
nd
->
inode
=
inode
;
nd
->
seq
=
seq
;
nd
->
seq
=
seq
;
return
NULL
;
return
NULL
;
...
...
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