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
a8d56d8e
Commit
a8d56d8e
authored
Nov 24, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vfs: spread struct mount - propagate_mnt()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c937135d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
fs/namespace.c
fs/namespace.c
+6
-6
fs/pnode.c
fs/pnode.c
+6
-6
fs/pnode.h
fs/pnode.h
+1
-1
No files found.
fs/namespace.c
View file @
a8d56d8e
...
...
@@ -1595,23 +1595,23 @@ static int attach_recursive_mnt(struct mount *source_mnt,
struct
path
*
path
,
struct
path
*
parent_path
)
{
LIST_HEAD
(
tree_list
);
struct
vfsmount
*
dest_mnt
=
path
->
mnt
;
struct
mount
*
dest_mnt
=
real_mount
(
path
->
mnt
)
;
struct
dentry
*
dest_dentry
=
path
->
dentry
;
struct
mount
*
child
,
*
p
;
int
err
;
if
(
IS_MNT_SHARED
(
dest_
mnt
))
{
if
(
IS_MNT_SHARED
(
&
dest_mnt
->
mnt
))
{
err
=
invent_group_ids
(
source_mnt
,
true
);
if
(
err
)
goto
out
;
}
err
=
propagate_mnt
(
dest_mnt
,
dest_dentry
,
&
source_mnt
->
mnt
,
&
tree_list
);
err
=
propagate_mnt
(
dest_mnt
,
dest_dentry
,
source_
mnt
,
&
tree_list
);
if
(
err
)
goto
out_cleanup_ids
;
br_write_lock
(
vfsmount_lock
);
if
(
IS_MNT_SHARED
(
dest_
mnt
))
{
if
(
IS_MNT_SHARED
(
&
dest_mnt
->
mnt
))
{
for
(
p
=
source_mnt
;
p
;
p
=
next_mnt
(
p
,
&
source_mnt
->
mnt
))
set_mnt_shared
(
p
);
}
...
...
@@ -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
,
dest_dentry
,
source_mnt
);
mnt_set_mountpoint
(
&
dest_mnt
->
mnt
,
dest_dentry
,
source_mnt
);
commit_tree
(
source_mnt
);
}
...
...
@@ -1633,7 +1633,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
return
0
;
out_cleanup_ids:
if
(
IS_MNT_SHARED
(
dest_
mnt
))
if
(
IS_MNT_SHARED
(
&
dest_mnt
->
mnt
))
cleanup_group_ids
(
source_mnt
,
NULL
);
out:
return
err
;
...
...
fs/pnode.c
View file @
a8d56d8e
...
...
@@ -217,18 +217,18 @@ static struct mount *get_source(struct mount *dest,
* @source_mnt: source mount.
* @tree_list : list of heads of trees to be attached.
*/
int
propagate_mnt
(
struct
vfs
mount
*
dest_mnt
,
struct
dentry
*
dest_dentry
,
struct
vfs
mount
*
source_mnt
,
struct
list_head
*
tree_list
)
int
propagate_mnt
(
struct
mount
*
dest_mnt
,
struct
dentry
*
dest_dentry
,
struct
mount
*
source_mnt
,
struct
list_head
*
tree_list
)
{
struct
mount
*
m
,
*
child
;
int
ret
=
0
;
struct
mount
*
prev_dest_mnt
=
real_mount
(
dest_mnt
)
;
struct
mount
*
prev_src_mnt
=
real_mount
(
source_mnt
)
;
struct
mount
*
prev_dest_mnt
=
dest_mnt
;
struct
mount
*
prev_src_mnt
=
source_mnt
;
LIST_HEAD
(
tmp_list
);
LIST_HEAD
(
umount_list
);
for
(
m
=
propagation_next
(
real_mount
(
dest_mnt
),
real_mount
(
dest_mnt
)
);
m
;
m
=
propagation_next
(
m
,
real_mount
(
dest_mnt
)
))
{
for
(
m
=
propagation_next
(
dest_mnt
,
dest_mnt
);
m
;
m
=
propagation_next
(
m
,
dest_mnt
))
{
int
type
;
struct
mount
*
source
;
...
...
fs/pnode.h
View file @
a8d56d8e
...
...
@@ -30,7 +30,7 @@ static inline void set_mnt_shared(struct mount *mnt)
}
void
change_mnt_propagation
(
struct
mount
*
,
int
);
int
propagate_mnt
(
struct
vfsmount
*
,
struct
dentry
*
,
struct
vfs
mount
*
,
int
propagate_mnt
(
struct
mount
*
,
struct
dentry
*
,
struct
mount
*
,
struct
list_head
*
);
int
propagate_umount
(
struct
list_head
*
);
int
propagate_mount_busy
(
struct
mount
*
,
int
);
...
...
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