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
Kirill Smelkov
linux
Commits
4b2619a5
Commit
4b2619a5
authored
Nov 24, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vfs: spread struct mount - commit_tree
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
419148da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
fs/namespace.c
fs/namespace.c
+9
-9
No files found.
fs/namespace.c
View file @
4b2619a5
...
...
@@ -609,16 +609,16 @@ static inline void __mnt_make_shortterm(struct vfsmount *mnt)
/*
* vfsmount lock must be held for write
*/
static
void
commit_tree
(
struct
vfs
mount
*
mnt
)
static
void
commit_tree
(
struct
mount
*
mnt
)
{
struct
vfsmount
*
parent
=
mnt
->
mnt_parent
;
struct
vfsmount
*
parent
=
mnt
->
mnt
.
mnt
_parent
;
struct
vfsmount
*
m
;
LIST_HEAD
(
head
);
struct
mnt_namespace
*
n
=
parent
->
mnt_ns
;
BUG_ON
(
parent
==
mnt
);
BUG_ON
(
parent
==
&
mnt
->
mnt
);
list_add_tail
(
&
head
,
&
mnt
->
mnt_list
);
list_add_tail
(
&
head
,
&
mnt
->
mnt
.
mnt
_list
);
list_for_each_entry
(
m
,
&
head
,
mnt_list
)
{
m
->
mnt_ns
=
n
;
__mnt_make_longterm
(
m
);
...
...
@@ -626,9 +626,9 @@ static void commit_tree(struct vfsmount *mnt)
list_splice
(
&
head
,
n
->
list
.
prev
);
list_add_tail
(
&
mnt
->
mnt_hash
,
mount_hashtable
+
hash
(
parent
,
mnt
->
mnt_mountpoint
));
list_add_tail
(
&
mnt
->
mnt_child
,
&
parent
->
mnt_mounts
);
list_add_tail
(
&
mnt
->
mnt
.
mnt
_hash
,
mount_hashtable
+
hash
(
parent
,
mnt
->
mnt
.
mnt
_mountpoint
));
list_add_tail
(
&
mnt
->
mnt
.
mnt
_child
,
&
parent
->
mnt_mounts
);
touch_mnt_namespace
(
n
);
}
...
...
@@ -1617,12 +1617,12 @@ static int attach_recursive_mnt(struct vfsmount *source_mnt,
touch_mnt_namespace
(
parent_path
->
mnt
->
mnt_ns
);
}
else
{
mnt_set_mountpoint
(
dest_mnt
,
dest_dentry
,
source_mnt
);
commit_tree
(
source_mnt
);
commit_tree
(
real_mount
(
source_mnt
)
);
}
list_for_each_entry_safe
(
child
,
p
,
&
tree_list
,
mnt
.
mnt_hash
)
{
list_del_init
(
&
child
->
mnt
.
mnt_hash
);
commit_tree
(
&
child
->
mnt
);
commit_tree
(
child
);
}
br_write_unlock
(
vfsmount_lock
);
...
...
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