Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
1c755af4
Commit
1c755af4
authored
15 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
switch lookup_mnt()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
79ed0226
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fs/namei.c
+3
-3
3 additions, 3 deletions
fs/namei.c
fs/namespace.c
+2
-2
2 additions, 2 deletions
fs/namespace.c
include/linux/dcache.h
+1
-1
1 addition, 1 deletion
include/linux/dcache.h
with
6 additions
and
6 deletions
fs/namei.c
+
3
−
3
View file @
1c755af4
...
...
@@ -702,7 +702,7 @@ static int __follow_mount(struct path *path)
{
int
res
=
0
;
while
(
d_mountpoint
(
path
->
dentry
))
{
struct
vfsmount
*
mounted
=
lookup_mnt
(
path
->
mnt
,
path
->
dentry
);
struct
vfsmount
*
mounted
=
lookup_mnt
(
path
);
if
(
!
mounted
)
break
;
dput
(
path
->
dentry
);
...
...
@@ -718,7 +718,7 @@ static int __follow_mount(struct path *path)
static
void
follow_mount
(
struct
path
*
path
)
{
while
(
d_mountpoint
(
path
->
dentry
))
{
struct
vfsmount
*
mounted
=
lookup_mnt
(
path
->
mnt
,
path
->
dentry
);
struct
vfsmount
*
mounted
=
lookup_mnt
(
path
);
if
(
!
mounted
)
break
;
dput
(
path
->
dentry
);
...
...
@@ -735,7 +735,7 @@ int follow_down(struct path *path)
{
struct
vfsmount
*
mounted
;
mounted
=
lookup_mnt
(
path
->
mnt
,
path
->
dentry
);
mounted
=
lookup_mnt
(
path
);
if
(
mounted
)
{
dput
(
path
->
dentry
);
mntput
(
path
->
mnt
);
...
...
This diff is collapsed.
Click to expand it.
fs/namespace.c
+
2
−
2
View file @
1c755af4
...
...
@@ -442,11 +442,11 @@ struct vfsmount *__lookup_mnt(struct vfsmount *mnt, struct dentry *dentry,
* lookup_mnt increments the ref count before returning
* the vfsmount struct.
*/
struct
vfsmount
*
lookup_mnt
(
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
)
struct
vfsmount
*
lookup_mnt
(
struct
path
*
path
)
{
struct
vfsmount
*
child_mnt
;
spin_lock
(
&
vfsmount_lock
);
if
((
child_mnt
=
__lookup_mnt
(
mnt
,
dentry
,
1
)))
if
((
child_mnt
=
__lookup_mnt
(
path
->
mnt
,
path
->
dentry
,
1
)))
mntget
(
child_mnt
);
spin_unlock
(
&
vfsmount_lock
);
return
child_mnt
;
...
...
This diff is collapsed.
Click to expand it.
include/linux/dcache.h
+
1
−
1
View file @
1c755af4
...
...
@@ -370,7 +370,7 @@ static inline int d_mountpoint(struct dentry *dentry)
return
dentry
->
d_mounted
;
}
extern
struct
vfsmount
*
lookup_mnt
(
struct
vfsmount
*
,
struct
dentry
*
);
extern
struct
vfsmount
*
lookup_mnt
(
struct
path
*
);
extern
struct
dentry
*
lookup_create
(
struct
nameidata
*
nd
,
int
is_dir
);
extern
int
sysctl_vfs_cache_pressure
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment