Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5ac3455a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
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看板
提交
5ac3455a
编写于
6月 16, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
get rid of BKL in fs/sysv
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
cc46759a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
1 addition
and
15 deletion
+1
-15
fs/sysv/dir.c
fs/sysv/dir.c
+1
-4
fs/sysv/inode.c
fs/sysv/inode.c
+0
-11
未找到文件。
fs/sysv/dir.c
浏览文件 @
5ac3455a
...
@@ -15,13 +15,13 @@
...
@@ -15,13 +15,13 @@
#include <linux/pagemap.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/highmem.h>
#include <linux/smp_lock.h>
#include <linux/swap.h>
#include <linux/swap.h>
#include "sysv.h"
#include "sysv.h"
static
int
sysv_readdir
(
struct
file
*
,
void
*
,
filldir_t
);
static
int
sysv_readdir
(
struct
file
*
,
void
*
,
filldir_t
);
const
struct
file_operations
sysv_dir_operations
=
{
const
struct
file_operations
sysv_dir_operations
=
{
.
llseek
=
generic_file_llseek
,
.
read
=
generic_read_dir
,
.
read
=
generic_read_dir
,
.
readdir
=
sysv_readdir
,
.
readdir
=
sysv_readdir
,
.
fsync
=
simple_fsync
,
.
fsync
=
simple_fsync
,
...
@@ -74,8 +74,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
...
@@ -74,8 +74,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
unsigned
long
n
=
pos
>>
PAGE_CACHE_SHIFT
;
unsigned
long
n
=
pos
>>
PAGE_CACHE_SHIFT
;
unsigned
long
npages
=
dir_pages
(
inode
);
unsigned
long
npages
=
dir_pages
(
inode
);
lock_kernel
();
pos
=
(
pos
+
SYSV_DIRSIZE
-
1
)
&
~
(
SYSV_DIRSIZE
-
1
);
pos
=
(
pos
+
SYSV_DIRSIZE
-
1
)
&
~
(
SYSV_DIRSIZE
-
1
);
if
(
pos
>=
inode
->
i_size
)
if
(
pos
>=
inode
->
i_size
)
goto
done
;
goto
done
;
...
@@ -113,7 +111,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
...
@@ -113,7 +111,6 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
done:
done:
filp
->
f_pos
=
((
loff_t
)
n
<<
PAGE_CACHE_SHIFT
)
|
offset
;
filp
->
f_pos
=
((
loff_t
)
n
<<
PAGE_CACHE_SHIFT
)
|
offset
;
unlock_kernel
();
return
0
;
return
0
;
}
}
...
...
fs/sysv/inode.c
浏览文件 @
5ac3455a
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
* the superblock.
* the superblock.
*/
*/
#include <linux/smp_lock.h>
#include <linux/highuid.h>
#include <linux/highuid.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/init.h>
...
@@ -37,7 +36,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
...
@@ -37,7 +36,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
unsigned
long
time
=
get_seconds
(),
old_time
;
unsigned
long
time
=
get_seconds
(),
old_time
;
lock_super
(
sb
);
lock_super
(
sb
);
lock_kernel
();
/*
/*
* If we are going to write out the super block,
* If we are going to write out the super block,
...
@@ -52,7 +50,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
...
@@ -52,7 +50,6 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
mark_buffer_dirty
(
sbi
->
s_bh2
);
mark_buffer_dirty
(
sbi
->
s_bh2
);
}
}
unlock_kernel
();
unlock_super
(
sb
);
unlock_super
(
sb
);
return
0
;
return
0
;
...
@@ -82,8 +79,6 @@ static void sysv_put_super(struct super_block *sb)
...
@@ -82,8 +79,6 @@ static void sysv_put_super(struct super_block *sb)
{
{
struct
sysv_sb_info
*
sbi
=
SYSV_SB
(
sb
);
struct
sysv_sb_info
*
sbi
=
SYSV_SB
(
sb
);
lock_kernel
();
if
(
sb
->
s_dirt
)
if
(
sb
->
s_dirt
)
sysv_write_super
(
sb
);
sysv_write_super
(
sb
);
...
@@ -99,8 +94,6 @@ static void sysv_put_super(struct super_block *sb)
...
@@ -99,8 +94,6 @@ static void sysv_put_super(struct super_block *sb)
brelse
(
sbi
->
s_bh2
);
brelse
(
sbi
->
s_bh2
);
kfree
(
sbi
);
kfree
(
sbi
);
unlock_kernel
();
}
}
static
int
sysv_statfs
(
struct
dentry
*
dentry
,
struct
kstatfs
*
buf
)
static
int
sysv_statfs
(
struct
dentry
*
dentry
,
struct
kstatfs
*
buf
)
...
@@ -275,7 +268,6 @@ int sysv_write_inode(struct inode *inode, int wait)
...
@@ -275,7 +268,6 @@ int sysv_write_inode(struct inode *inode, int wait)
return
-
EIO
;
return
-
EIO
;
}
}
lock_kernel
();
raw_inode
->
i_mode
=
cpu_to_fs16
(
sbi
,
inode
->
i_mode
);
raw_inode
->
i_mode
=
cpu_to_fs16
(
sbi
,
inode
->
i_mode
);
raw_inode
->
i_uid
=
cpu_to_fs16
(
sbi
,
fs_high2lowuid
(
inode
->
i_uid
));
raw_inode
->
i_uid
=
cpu_to_fs16
(
sbi
,
fs_high2lowuid
(
inode
->
i_uid
));
raw_inode
->
i_gid
=
cpu_to_fs16
(
sbi
,
fs_high2lowgid
(
inode
->
i_gid
));
raw_inode
->
i_gid
=
cpu_to_fs16
(
sbi
,
fs_high2lowgid
(
inode
->
i_gid
));
...
@@ -291,7 +283,6 @@ int sysv_write_inode(struct inode *inode, int wait)
...
@@ -291,7 +283,6 @@ int sysv_write_inode(struct inode *inode, int wait)
for
(
block
=
0
;
block
<
10
+
1
+
1
+
1
;
block
++
)
for
(
block
=
0
;
block
<
10
+
1
+
1
+
1
;
block
++
)
write3byte
(
sbi
,
(
u8
*
)
&
si
->
i_data
[
block
],
write3byte
(
sbi
,
(
u8
*
)
&
si
->
i_data
[
block
],
&
raw_inode
->
i_data
[
3
*
block
]);
&
raw_inode
->
i_data
[
3
*
block
]);
unlock_kernel
();
mark_buffer_dirty
(
bh
);
mark_buffer_dirty
(
bh
);
if
(
wait
)
{
if
(
wait
)
{
sync_dirty_buffer
(
bh
);
sync_dirty_buffer
(
bh
);
...
@@ -315,9 +306,7 @@ static void sysv_delete_inode(struct inode *inode)
...
@@ -315,9 +306,7 @@ static void sysv_delete_inode(struct inode *inode)
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
inode
->
i_size
=
0
;
inode
->
i_size
=
0
;
sysv_truncate
(
inode
);
sysv_truncate
(
inode
);
lock_kernel
();
sysv_free_inode
(
inode
);
sysv_free_inode
(
inode
);
unlock_kernel
();
}
}
static
struct
kmem_cache
*
sysv_inode_cachep
;
static
struct
kmem_cache
*
sysv_inode_cachep
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录