Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a8d56d8e
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看板
提交
a8d56d8e
编写于
11月 24, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vfs: spread struct mount - propagate_mnt()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
c937135d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
13 deletion
+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
未找到文件。
fs/namespace.c
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录