Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
761d5c38
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
761d5c38
编写于
11月 24, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vfs: spread struct mount - umount_tree argument
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
1b8e5564
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
20 deletion
+20
-20
fs/namespace.c
fs/namespace.c
+18
-18
fs/pnode.c
fs/pnode.c
+1
-1
fs/pnode.h
fs/pnode.h
+1
-1
未找到文件。
fs/namespace.c
浏览文件 @
761d5c38
...
...
@@ -1217,12 +1217,12 @@ void release_mounts(struct list_head *head)
* vfsmount lock must be held for write
* namespace_sem must be held for write
*/
void
umount_tree
(
struct
vfs
mount
*
mnt
,
int
propagate
,
struct
list_head
*
kill
)
void
umount_tree
(
struct
mount
*
mnt
,
int
propagate
,
struct
list_head
*
kill
)
{
LIST_HEAD
(
tmp_list
);
struct
mount
*
p
;
for
(
p
=
real_mount
(
mnt
);
p
;
p
=
next_mnt
(
p
,
mnt
))
for
(
p
=
mnt
;
p
;
p
=
next_mnt
(
p
,
&
mnt
->
mnt
))
list_move
(
&
p
->
mnt_hash
,
&
tmp_list
);
if
(
propagate
)
...
...
@@ -1327,7 +1327,7 @@ static int do_umount(struct vfsmount *mnt, int flags)
retval
=
-
EBUSY
;
if
(
flags
&
MNT_DETACH
||
!
propagate_mount_busy
(
mnt
,
2
))
{
if
(
!
list_empty
(
&
mnt
->
mnt_list
))
umount_tree
(
mnt
,
1
,
&
umount_list
);
umount_tree
(
real_mount
(
mnt
)
,
1
,
&
umount_list
);
retval
=
0
;
}
br_write_unlock
(
vfsmount_lock
);
...
...
@@ -1455,7 +1455,7 @@ struct mount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
if
(
res
)
{
LIST_HEAD
(
umount_list
);
br_write_lock
(
vfsmount_lock
);
umount_tree
(
&
res
->
mnt
,
0
,
&
umount_list
);
umount_tree
(
res
,
0
,
&
umount_list
);
br_write_unlock
(
vfsmount_lock
);
release_mounts
(
&
umount_list
);
}
...
...
@@ -1476,7 +1476,7 @@ void drop_collected_mounts(struct vfsmount *mnt)
LIST_HEAD
(
umount_list
);
down_write
(
&
namespace_sem
);
br_write_lock
(
vfsmount_lock
);
umount_tree
(
mnt
,
0
,
&
umount_list
);
umount_tree
(
real_mount
(
mnt
)
,
0
,
&
umount_list
);
br_write_unlock
(
vfsmount_lock
);
up_write
(
&
namespace_sem
);
release_mounts
(
&
umount_list
);
...
...
@@ -1773,7 +1773,7 @@ static int do_loopback(struct path *path, char *old_name,
err
=
graft_tree
(
&
mnt
->
mnt
,
path
);
if
(
err
)
{
br_write_lock
(
vfsmount_lock
);
umount_tree
(
&
mnt
->
mnt
,
0
,
&
umount_list
);
umount_tree
(
mnt
,
0
,
&
umount_list
);
br_write_unlock
(
vfsmount_lock
);
}
out2:
...
...
@@ -2080,7 +2080,7 @@ EXPORT_SYMBOL(mnt_set_expiry);
*/
void
mark_mounts_for_expiry
(
struct
list_head
*
mounts
)
{
struct
vfs
mount
*
mnt
,
*
next
;
struct
mount
*
mnt
,
*
next
;
LIST_HEAD
(
graveyard
);
LIST_HEAD
(
umounts
);
...
...
@@ -2096,15 +2096,15 @@ void mark_mounts_for_expiry(struct list_head *mounts)
* - still marked for expiry (marked on the last call here; marks are
* cleared by mntput())
*/
list_for_each_entry_safe
(
mnt
,
next
,
mounts
,
mnt_expire
)
{
if
(
!
xchg
(
&
mnt
->
mnt_expiry_mark
,
1
)
||
propagate_mount_busy
(
mnt
,
1
))
list_for_each_entry_safe
(
mnt
,
next
,
mounts
,
mnt
.
mnt
_expire
)
{
if
(
!
xchg
(
&
mnt
->
mnt
.
mnt
_expiry_mark
,
1
)
||
propagate_mount_busy
(
&
mnt
->
mnt
,
1
))
continue
;
list_move
(
&
mnt
->
mnt_expire
,
&
graveyard
);
list_move
(
&
mnt
->
mnt
.
mnt
_expire
,
&
graveyard
);
}
while
(
!
list_empty
(
&
graveyard
))
{
mnt
=
list_first_entry
(
&
graveyard
,
struct
vfsmount
,
mnt_expire
);
touch_mnt_namespace
(
mnt
->
mnt_ns
);
mnt
=
list_first_entry
(
&
graveyard
,
struct
mount
,
mnt
.
mnt_expire
);
touch_mnt_namespace
(
mnt
->
mnt
.
mnt
_ns
);
umount_tree
(
mnt
,
1
,
&
umounts
);
}
br_write_unlock
(
vfsmount_lock
);
...
...
@@ -2170,14 +2170,14 @@ static int select_submounts(struct vfsmount *parent, struct list_head *graveyard
static
void
shrink_submounts
(
struct
vfsmount
*
mnt
,
struct
list_head
*
umounts
)
{
LIST_HEAD
(
graveyard
);
struct
vfs
mount
*
m
;
struct
mount
*
m
;
/* extract submounts of 'mountpoint' from the expiration list */
while
(
select_submounts
(
mnt
,
&
graveyard
))
{
while
(
!
list_empty
(
&
graveyard
))
{
m
=
list_first_entry
(
&
graveyard
,
struct
vfs
mount
,
mnt_expire
);
touch_mnt_namespace
(
m
->
mnt_ns
);
m
=
list_first_entry
(
&
graveyard
,
struct
mount
,
mnt
.
mnt
_expire
);
touch_mnt_namespace
(
m
->
mnt
.
mnt
_ns
);
umount_tree
(
m
,
1
,
umounts
);
}
}
...
...
@@ -2750,7 +2750,7 @@ void put_mnt_ns(struct mnt_namespace *ns)
return
;
down_write
(
&
namespace_sem
);
br_write_lock
(
vfsmount_lock
);
umount_tree
(
ns
->
root
,
0
,
&
umount_list
);
umount_tree
(
real_mount
(
ns
->
root
)
,
0
,
&
umount_list
);
br_write_unlock
(
vfsmount_lock
);
up_write
(
&
namespace_sem
);
release_mounts
(
&
umount_list
);
...
...
fs/pnode.c
浏览文件 @
761d5c38
...
...
@@ -262,7 +262,7 @@ int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
br_write_lock
(
vfsmount_lock
);
while
(
!
list_empty
(
&
tmp_list
))
{
child
=
list_first_entry
(
&
tmp_list
,
struct
mount
,
mnt_hash
);
umount_tree
(
&
child
->
mnt
,
0
,
&
umount_list
);
umount_tree
(
child
,
0
,
&
umount_list
);
}
br_write_unlock
(
vfsmount_lock
);
release_mounts
(
&
umount_list
);
...
...
fs/pnode.h
浏览文件 @
761d5c38
...
...
@@ -40,7 +40,7 @@ unsigned int mnt_get_count(struct vfsmount *mnt);
void
mnt_set_mountpoint
(
struct
vfsmount
*
,
struct
dentry
*
,
struct
vfsmount
*
);
void
release_mounts
(
struct
list_head
*
);
void
umount_tree
(
struct
vfs
mount
*
,
int
,
struct
list_head
*
);
void
umount_tree
(
struct
mount
*
,
int
,
struct
list_head
*
);
struct
mount
*
copy_tree
(
struct
vfsmount
*
,
struct
dentry
*
,
int
);
bool
is_path_reachable
(
struct
vfsmount
*
,
struct
dentry
*
,
const
struct
path
*
root
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录