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
bab77ebf
Commit
bab77ebf
authored
Apr 18, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch follow_up() to struct path
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
e64c390c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
fs/autofs4/dev-ioctl.c
fs/autofs4/dev-ioctl.c
+1
-1
fs/namei.c
fs/namei.c
+8
-8
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+1
-1
include/linux/namei.h
include/linux/namei.h
+1
-1
No files found.
fs/autofs4/dev-ioctl.c
View file @
bab77ebf
...
@@ -212,7 +212,7 @@ static int find_autofs_mount(const char *pathname,
...
@@ -212,7 +212,7 @@ static int find_autofs_mount(const char *pathname,
err
=
0
;
err
=
0
;
}
}
}
}
if
(
!
follow_up
(
&
path
.
mnt
,
&
path
.
dentry
))
if
(
!
follow_up
(
&
path
))
break
;
break
;
}
}
path_put
(
&
path
);
path_put
(
&
path
);
...
...
fs/namei.c
View file @
bab77ebf
...
@@ -675,23 +675,23 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
...
@@ -675,23 +675,23 @@ static inline int do_follow_link(struct path *path, struct nameidata *nd)
return
err
;
return
err
;
}
}
int
follow_up
(
struct
vfsmount
**
mnt
,
struct
dentry
**
dentry
)
int
follow_up
(
struct
path
*
path
)
{
{
struct
vfsmount
*
parent
;
struct
vfsmount
*
parent
;
struct
dentry
*
mountpoint
;
struct
dentry
*
mountpoint
;
spin_lock
(
&
vfsmount_lock
);
spin_lock
(
&
vfsmount_lock
);
parent
=
(
*
mnt
)
->
mnt_parent
;
parent
=
path
->
mnt
->
mnt_parent
;
if
(
parent
==
*
mnt
)
{
if
(
parent
==
path
->
mnt
)
{
spin_unlock
(
&
vfsmount_lock
);
spin_unlock
(
&
vfsmount_lock
);
return
0
;
return
0
;
}
}
mntget
(
parent
);
mntget
(
parent
);
mountpoint
=
dget
((
*
mnt
)
->
mnt_mountpoint
);
mountpoint
=
dget
(
path
->
mnt
->
mnt_mountpoint
);
spin_unlock
(
&
vfsmount_lock
);
spin_unlock
(
&
vfsmount_lock
);
dput
(
*
dentry
);
dput
(
path
->
dentry
);
*
dentry
=
mountpoint
;
path
->
dentry
=
mountpoint
;
mntput
(
*
mnt
);
mntput
(
path
->
mnt
);
*
mnt
=
parent
;
path
->
mnt
=
parent
;
return
1
;
return
1
;
}
}
...
...
fs/nfsd/vfs.c
View file @
bab77ebf
...
@@ -173,7 +173,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
...
@@ -173,7 +173,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
.
dentry
=
dget
(
dparent
)};
.
dentry
=
dget
(
dparent
)};
while
(
path
.
dentry
==
path
.
mnt
->
mnt_root
&&
while
(
path
.
dentry
==
path
.
mnt
->
mnt_root
&&
follow_up
(
&
path
.
mnt
,
&
path
.
dentry
))
follow_up
(
&
path
))
;
;
dp
=
dget_parent
(
path
.
dentry
);
dp
=
dget_parent
(
path
.
dentry
);
dput
(
path
.
dentry
);
dput
(
path
.
dentry
);
...
...
include/linux/namei.h
View file @
bab77ebf
...
@@ -79,7 +79,7 @@ extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
...
@@ -79,7 +79,7 @@ extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
extern
struct
dentry
*
lookup_one_noperm
(
const
char
*
,
struct
dentry
*
);
extern
struct
dentry
*
lookup_one_noperm
(
const
char
*
,
struct
dentry
*
);
extern
int
follow_down
(
struct
vfsmount
**
,
struct
dentry
**
);
extern
int
follow_down
(
struct
vfsmount
**
,
struct
dentry
**
);
extern
int
follow_up
(
struct
vfsmount
**
,
struct
dentry
*
*
);
extern
int
follow_up
(
struct
path
*
);
extern
struct
dentry
*
lock_rename
(
struct
dentry
*
,
struct
dentry
*
);
extern
struct
dentry
*
lock_rename
(
struct
dentry
*
,
struct
dentry
*
);
extern
void
unlock_rename
(
struct
dentry
*
,
struct
dentry
*
);
extern
void
unlock_rename
(
struct
dentry
*
,
struct
dentry
*
);
...
...
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