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
3ab6abee
Commit
3ab6abee
authored
Mar 16, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more conversions to namespace_unlock()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b54b9be7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
fs/namespace.c
fs/namespace.c
+6
-14
No files found.
fs/namespace.c
View file @
3ab6abee
...
@@ -1426,13 +1426,11 @@ struct vfsmount *collect_mounts(struct path *path)
...
@@ -1426,13 +1426,11 @@ struct vfsmount *collect_mounts(struct path *path)
void
drop_collected_mounts
(
struct
vfsmount
*
mnt
)
void
drop_collected_mounts
(
struct
vfsmount
*
mnt
)
{
{
LIST_HEAD
(
umount_list
);
down_write
(
&
namespace_sem
);
down_write
(
&
namespace_sem
);
br_write_lock
(
&
vfsmount_lock
);
br_write_lock
(
&
vfsmount_lock
);
umount_tree
(
real_mount
(
mnt
),
0
,
&
u
mount_list
);
umount_tree
(
real_mount
(
mnt
),
0
,
&
u
nmounted
);
br_write_unlock
(
&
vfsmount_lock
);
br_write_unlock
(
&
vfsmount_lock
);
up_write
(
&
namespace_sem
);
namespace_unlock
();
release_mounts
(
&
umount_list
);
}
}
int
iterate_mounts
(
int
(
*
f
)(
struct
vfsmount
*
,
void
*
),
void
*
arg
,
int
iterate_mounts
(
int
(
*
f
)(
struct
vfsmount
*
,
void
*
),
void
*
arg
,
...
@@ -2060,7 +2058,6 @@ void mark_mounts_for_expiry(struct list_head *mounts)
...
@@ -2060,7 +2058,6 @@ void mark_mounts_for_expiry(struct list_head *mounts)
{
{
struct
mount
*
mnt
,
*
next
;
struct
mount
*
mnt
,
*
next
;
LIST_HEAD
(
graveyard
);
LIST_HEAD
(
graveyard
);
LIST_HEAD
(
umounts
);
if
(
list_empty
(
mounts
))
if
(
list_empty
(
mounts
))
return
;
return
;
...
@@ -2083,12 +2080,10 @@ void mark_mounts_for_expiry(struct list_head *mounts)
...
@@ -2083,12 +2080,10 @@ void mark_mounts_for_expiry(struct list_head *mounts)
while
(
!
list_empty
(
&
graveyard
))
{
while
(
!
list_empty
(
&
graveyard
))
{
mnt
=
list_first_entry
(
&
graveyard
,
struct
mount
,
mnt_expire
);
mnt
=
list_first_entry
(
&
graveyard
,
struct
mount
,
mnt_expire
);
touch_mnt_namespace
(
mnt
->
mnt_ns
);
touch_mnt_namespace
(
mnt
->
mnt_ns
);
umount_tree
(
mnt
,
1
,
&
u
mounts
);
umount_tree
(
mnt
,
1
,
&
u
nmounted
);
}
}
br_write_unlock
(
&
vfsmount_lock
);
br_write_unlock
(
&
vfsmount_lock
);
up_write
(
&
namespace_sem
);
namespace_unlock
();
release_mounts
(
&
umounts
);
}
}
EXPORT_SYMBOL_GPL
(
mark_mounts_for_expiry
);
EXPORT_SYMBOL_GPL
(
mark_mounts_for_expiry
);
...
@@ -2741,16 +2736,13 @@ void __init mnt_init(void)
...
@@ -2741,16 +2736,13 @@ void __init mnt_init(void)
void
put_mnt_ns
(
struct
mnt_namespace
*
ns
)
void
put_mnt_ns
(
struct
mnt_namespace
*
ns
)
{
{
LIST_HEAD
(
umount_list
);
if
(
!
atomic_dec_and_test
(
&
ns
->
count
))
if
(
!
atomic_dec_and_test
(
&
ns
->
count
))
return
;
return
;
down_write
(
&
namespace_sem
);
down_write
(
&
namespace_sem
);
br_write_lock
(
&
vfsmount_lock
);
br_write_lock
(
&
vfsmount_lock
);
umount_tree
(
ns
->
root
,
0
,
&
u
mount_list
);
umount_tree
(
ns
->
root
,
0
,
&
u
nmounted
);
br_write_unlock
(
&
vfsmount_lock
);
br_write_unlock
(
&
vfsmount_lock
);
up_write
(
&
namespace_sem
);
namespace_unlock
();
release_mounts
(
&
umount_list
);
free_mnt_ns
(
ns
);
free_mnt_ns
(
ns
);
}
}
...
...
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