Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
faf0dceb
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看板
提交
faf0dceb
编写于
12月 22, 2016
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'work.namespace' into for-linus
上级
128394ef
5235d448
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
44 deletion
+38
-44
fs/namespace.c
fs/namespace.c
+2
-6
fs/pnode.c
fs/pnode.c
+36
-38
未找到文件。
fs/namespace.c
浏览文件 @
faf0dceb
...
...
@@ -96,10 +96,6 @@ static inline struct hlist_head *mp_hash(struct dentry *dentry)
return
&
mountpoint_hashtable
[
tmp
&
mp_hash_mask
];
}
/*
* allocation is serialized by namespace_sem, but we need the spinlock to
* serialize with freeing.
*/
static
int
mnt_alloc_id
(
struct
mount
*
mnt
)
{
int
res
;
...
...
@@ -1034,6 +1030,8 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
if
(
IS_MNT_SLAVE
(
old
))
list_add
(
&
mnt
->
mnt_slave
,
&
old
->
mnt_slave
);
mnt
->
mnt_master
=
old
->
mnt_master
;
}
else
{
CLEAR_MNT_SHARED
(
mnt
);
}
if
(
flag
&
CL_MAKE_SHARED
)
set_mnt_shared
(
mnt
);
...
...
@@ -1828,9 +1826,7 @@ struct vfsmount *clone_private_mount(const struct path *path)
if
(
IS_MNT_UNBINDABLE
(
old_mnt
))
return
ERR_PTR
(
-
EINVAL
);
down_read
(
&
namespace_sem
);
new_mnt
=
clone_mnt
(
old_mnt
,
path
->
dentry
,
CL_PRIVATE
);
up_read
(
&
namespace_sem
);
if
(
IS_ERR
(
new_mnt
))
return
ERR_CAST
(
new_mnt
);
...
...
fs/pnode.c
浏览文件 @
faf0dceb
...
...
@@ -67,49 +67,47 @@ int get_dominating_id(struct mount *mnt, const struct path *root)
static
int
do_make_slave
(
struct
mount
*
mnt
)
{
struct
mount
*
peer_mnt
=
mnt
,
*
master
=
mnt
->
mnt_master
;
struct
mount
*
slave_mnt
;
struct
mount
*
master
,
*
slave_mnt
;
/*
* slave 'mnt' to a peer mount that has the
* same root dentry. If none is available then
* slave it to anything that is available.
*/
while
((
peer_mnt
=
next_peer
(
peer_mnt
))
!=
mnt
&&
peer_mnt
->
mnt
.
mnt_root
!=
mnt
->
mnt
.
mnt_root
)
;
if
(
peer_mnt
==
mnt
)
{
peer_mnt
=
next_peer
(
mnt
);
if
(
peer_mnt
==
mnt
)
peer_mnt
=
NULL
;
}
if
(
mnt
->
mnt_group_id
&&
IS_MNT_SHARED
(
mnt
)
&&
list_empty
(
&
mnt
->
mnt_share
))
mnt_release_group_id
(
mnt
);
list_del_init
(
&
mnt
->
mnt_share
);
mnt
->
mnt_group_id
=
0
;
if
(
peer_mnt
)
master
=
peer_mnt
;
if
(
master
)
{
list_for_each_entry
(
slave_mnt
,
&
mnt
->
mnt_slave_list
,
mnt_slave
)
slave_mnt
->
mnt_master
=
master
;
list_move
(
&
mnt
->
mnt_slave
,
&
master
->
mnt_slave_list
);
list_splice
(
&
mnt
->
mnt_slave_list
,
master
->
mnt_slave_list
.
prev
);
INIT_LIST_HEAD
(
&
mnt
->
mnt_slave_list
);
if
(
list_empty
(
&
mnt
->
mnt_share
))
{
if
(
IS_MNT_SHARED
(
mnt
))
{
mnt_release_group_id
(
mnt
);
CLEAR_MNT_SHARED
(
mnt
);
}
master
=
mnt
->
mnt_master
;
if
(
!
master
)
{
struct
list_head
*
p
=
&
mnt
->
mnt_slave_list
;
while
(
!
list_empty
(
p
))
{
slave_mnt
=
list_first_entry
(
p
,
struct
mount
,
mnt_slave
);
list_del_init
(
&
slave_mnt
->
mnt_slave
);
slave_mnt
->
mnt_master
=
NULL
;
}
return
0
;
}
}
else
{
struct
list_head
*
p
=
&
mnt
->
mnt_slave_list
;
while
(
!
list_empty
(
p
))
{
slave_mnt
=
list_first_entry
(
p
,
struct
mount
,
mnt_slave
);
list_del_init
(
&
slave_mnt
->
mnt_slave
);
slave_mnt
->
mnt_master
=
NULL
;
struct
mount
*
m
;
/*
* slave 'mnt' to a peer mount that has the
* same root dentry. If none is available then
* slave it to anything that is available.
*/
for
(
m
=
master
=
next_peer
(
mnt
);
m
!=
mnt
;
m
=
next_peer
(
m
))
{
if
(
m
->
mnt
.
mnt_root
==
mnt
->
mnt
.
mnt_root
)
{
master
=
m
;
break
;
}
}
list_del_init
(
&
mnt
->
mnt_share
);
mnt
->
mnt_group_id
=
0
;
CLEAR_MNT_SHARED
(
mnt
);
}
list_for_each_entry
(
slave_mnt
,
&
mnt
->
mnt_slave_list
,
mnt_slave
)
slave_mnt
->
mnt_master
=
master
;
list_move
(
&
mnt
->
mnt_slave
,
&
master
->
mnt_slave_list
);
list_splice
(
&
mnt
->
mnt_slave_list
,
master
->
mnt_slave_list
.
prev
);
INIT_LIST_HEAD
(
&
mnt
->
mnt_slave_list
);
mnt
->
mnt_master
=
master
;
CLEAR_MNT_SHARED
(
mnt
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录