Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4aa98cf7
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4aa98cf7
编写于
5月 08, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Push BKL down into do_remount_sb()
[folded fix from Jiri Slaby] Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
7f78d4cd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
fs/namespace.c
fs/namespace.c
+2
-8
fs/super.c
fs/super.c
+11
-5
未找到文件。
fs/namespace.c
浏览文件 @
4aa98cf7
...
...
@@ -1060,11 +1060,8 @@ static int do_umount(struct vfsmount *mnt, int flags)
* we just try to remount it readonly.
*/
down_write
(
&
sb
->
s_umount
);
if
(
!
(
sb
->
s_flags
&
MS_RDONLY
))
{
lock_kernel
();
if
(
!
(
sb
->
s_flags
&
MS_RDONLY
))
retval
=
do_remount_sb
(
sb
,
MS_RDONLY
,
NULL
,
0
);
unlock_kernel
();
}
up_write
(
&
sb
->
s_umount
);
return
retval
;
}
...
...
@@ -1515,11 +1512,8 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
down_write
(
&
sb
->
s_umount
);
if
(
flags
&
MS_BIND
)
err
=
change_mount_flags
(
path
->
mnt
,
flags
);
else
{
lock_kernel
();
else
err
=
do_remount_sb
(
sb
,
flags
,
data
,
0
);
unlock_kernel
();
}
if
(
!
err
)
path
->
mnt
->
mnt_flags
=
mnt_flags
;
up_write
(
&
sb
->
s_umount
);
...
...
fs/super.c
浏览文件 @
4aa98cf7
...
...
@@ -542,25 +542,33 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force)
shrink_dcache_sb
(
sb
);
sync_filesystem
(
sb
);
lock_kernel
();
/* If we are remounting RDONLY and current sb is read/write,
make sure there are no rw files opened */
if
((
flags
&
MS_RDONLY
)
&&
!
(
sb
->
s_flags
&
MS_RDONLY
))
{
if
(
force
)
mark_files_ro
(
sb
);
else
if
(
!
fs_may_remount_ro
(
sb
))
else
if
(
!
fs_may_remount_ro
(
sb
))
{
unlock_kernel
();
return
-
EBUSY
;
}
retval
=
vfs_dq_off
(
sb
,
1
);
if
(
retval
<
0
&&
retval
!=
-
ENOSYS
)
if
(
retval
<
0
&&
retval
!=
-
ENOSYS
)
{
unlock_kernel
();
return
-
EBUSY
;
}
}
remount_rw
=
!
(
flags
&
MS_RDONLY
)
&&
(
sb
->
s_flags
&
MS_RDONLY
);
if
(
sb
->
s_op
->
remount_fs
)
{
retval
=
sb
->
s_op
->
remount_fs
(
sb
,
&
flags
,
data
);
if
(
retval
)
if
(
retval
)
{
unlock_kernel
();
return
retval
;
}
}
sb
->
s_flags
=
(
sb
->
s_flags
&
~
MS_RMT_MASK
)
|
(
flags
&
MS_RMT_MASK
);
unlock_kernel
();
if
(
remount_rw
)
vfs_dq_quota_on_remount
(
sb
);
return
0
;
...
...
@@ -581,9 +589,7 @@ static void do_emergency_remount(struct work_struct *work)
*
* What lock protects sb->s_flags??
*/
lock_kernel
();
do_remount_sb
(
sb
,
MS_RDONLY
,
NULL
,
1
);
unlock_kernel
();
}
up_write
(
&
sb
->
s_umount
);
put_super
(
sb
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录