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
14cf1fa8
Commit
14cf1fa8
authored
13 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
vfs: spread struct mount - remaining argument of mnt_set_mountpoint()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
a8d56d8e
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fs/namespace.c
+4
-4
4 additions, 4 deletions
fs/namespace.c
fs/pnode.c
+1
-1
1 addition, 1 deletion
fs/pnode.c
fs/pnode.h
+1
-1
1 addition, 1 deletion
fs/pnode.h
with
6 additions
and
6 deletions
fs/namespace.c
+
4
−
4
View file @
14cf1fa8
...
...
@@ -570,10 +570,10 @@ static void detach_mnt(struct mount *mnt, struct path *old_path)
/*
* vfsmount lock must be held for write
*/
void
mnt_set_mountpoint
(
struct
vfs
mount
*
mnt
,
struct
dentry
*
dentry
,
void
mnt_set_mountpoint
(
struct
mount
*
mnt
,
struct
dentry
*
dentry
,
struct
mount
*
child_mnt
)
{
child_mnt
->
mnt_parent
=
real_mount
(
mntget
(
mnt
));
child_mnt
->
mnt_parent
=
real_mount
(
mntget
(
&
mnt
->
mnt
));
child_mnt
->
mnt_mountpoint
=
dget
(
dentry
);
spin_lock
(
&
dentry
->
d_lock
);
dentry
->
d_flags
|=
DCACHE_MOUNTED
;
...
...
@@ -585,7 +585,7 @@ void mnt_set_mountpoint(struct vfsmount *mnt, struct dentry *dentry,
*/
static
void
attach_mnt
(
struct
mount
*
mnt
,
struct
path
*
path
)
{
mnt_set_mountpoint
(
path
->
mnt
,
path
->
dentry
,
mnt
);
mnt_set_mountpoint
(
real_mount
(
path
->
mnt
)
,
path
->
dentry
,
mnt
);
list_add_tail
(
&
mnt
->
mnt_hash
,
mount_hashtable
+
hash
(
path
->
mnt
,
path
->
dentry
));
list_add_tail
(
&
mnt
->
mnt_child
,
&
real_mount
(
path
->
mnt
)
->
mnt_mounts
);
...
...
@@ -1620,7 +1620,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
attach_mnt
(
source_mnt
,
path
);
touch_mnt_namespace
(
parent_path
->
mnt
->
mnt_ns
);
}
else
{
mnt_set_mountpoint
(
&
dest_mnt
->
mnt
,
dest_dentry
,
source_mnt
);
mnt_set_mountpoint
(
dest_mnt
,
dest_dentry
,
source_mnt
);
commit_tree
(
source_mnt
);
}
...
...
This diff is collapsed.
Click to expand it.
fs/pnode.c
+
1
−
1
View file @
14cf1fa8
...
...
@@ -244,7 +244,7 @@ int propagate_mnt(struct mount *dest_mnt, struct dentry *dest_dentry,
}
if
(
is_subdir
(
dest_dentry
,
m
->
mnt
.
mnt_root
))
{
mnt_set_mountpoint
(
&
m
->
mnt
,
dest_dentry
,
child
);
mnt_set_mountpoint
(
m
,
dest_dentry
,
child
);
list_add_tail
(
&
child
->
mnt_hash
,
tree_list
);
}
else
{
/*
...
...
This diff is collapsed.
Click to expand it.
fs/pnode.h
+
1
−
1
View file @
14cf1fa8
...
...
@@ -37,7 +37,7 @@ int propagate_mount_busy(struct mount *, int);
void
mnt_release_group_id
(
struct
mount
*
);
int
get_dominating_id
(
struct
mount
*
mnt
,
const
struct
path
*
root
);
unsigned
int
mnt_get_count
(
struct
mount
*
mnt
);
void
mnt_set_mountpoint
(
struct
vfs
mount
*
,
struct
dentry
*
,
void
mnt_set_mountpoint
(
struct
mount
*
,
struct
dentry
*
,
struct
mount
*
);
void
release_mounts
(
struct
list_head
*
);
void
umount_tree
(
struct
mount
*
,
int
,
struct
list_head
*
);
...
...
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