Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
d9349285
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d9349285
编写于
11月 25, 2011
作者:
C
Cong Wang
提交者:
Cong Wang
3月 20, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gfs2: remove the second argument of k[un]map_atomic()
Signed-off-by:
N
Cong Wang
<
amwang@redhat.com
>
上级
2408f6ef
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
12 deletion
+12
-12
fs/gfs2/aops.c
fs/gfs2/aops.c
+6
-6
fs/gfs2/lops.c
fs/gfs2/lops.c
+4
-4
fs/gfs2/quota.c
fs/gfs2/quota.c
+2
-2
未找到文件。
fs/gfs2/aops.c
浏览文件 @
d9349285
...
...
@@ -434,12 +434,12 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
if
(
error
)
return
error
;
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
page
);
if
(
dsize
>
(
dibh
->
b_size
-
sizeof
(
struct
gfs2_dinode
)))
dsize
=
(
dibh
->
b_size
-
sizeof
(
struct
gfs2_dinode
));
memcpy
(
kaddr
,
dibh
->
b_data
+
sizeof
(
struct
gfs2_dinode
),
dsize
);
memset
(
kaddr
+
dsize
,
0
,
PAGE_CACHE_SIZE
-
dsize
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
flush_dcache_page
(
page
);
brelse
(
dibh
);
SetPageUptodate
(
page
);
...
...
@@ -542,9 +542,9 @@ int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state,
page
=
read_cache_page
(
mapping
,
index
,
__gfs2_readpage
,
NULL
);
if
(
IS_ERR
(
page
))
return
PTR_ERR
(
page
);
p
=
kmap_atomic
(
page
,
KM_USER0
);
p
=
kmap_atomic
(
page
);
memcpy
(
buf
+
copied
,
p
+
offset
,
amt
);
kunmap_atomic
(
p
,
KM_USER0
);
kunmap_atomic
(
p
);
mark_page_accessed
(
page
);
page_cache_release
(
page
);
copied
+=
amt
;
...
...
@@ -788,11 +788,11 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,
unsigned
char
*
buf
=
dibh
->
b_data
+
sizeof
(
struct
gfs2_dinode
);
BUG_ON
((
pos
+
len
)
>
(
dibh
->
b_size
-
sizeof
(
struct
gfs2_dinode
)));
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
page
);
memcpy
(
buf
+
pos
,
kaddr
+
pos
,
copied
);
memset
(
kaddr
+
pos
+
copied
,
0
,
len
-
copied
);
flush_dcache_page
(
page
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
if
(
!
PageUptodate
(
page
))
SetPageUptodate
(
page
);
...
...
fs/gfs2/lops.c
浏览文件 @
d9349285
...
...
@@ -553,11 +553,11 @@ static void gfs2_check_magic(struct buffer_head *bh)
__be32
*
ptr
;
clear_buffer_escaped
(
bh
);
kaddr
=
kmap_atomic
(
bh
->
b_page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
bh
->
b_page
);
ptr
=
kaddr
+
bh_offset
(
bh
);
if
(
*
ptr
==
cpu_to_be32
(
GFS2_MAGIC
))
set_buffer_escaped
(
bh
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
}
static
void
gfs2_write_blocks
(
struct
gfs2_sbd
*
sdp
,
struct
buffer_head
*
bh
,
...
...
@@ -594,10 +594,10 @@ static void gfs2_write_blocks(struct gfs2_sbd *sdp, struct buffer_head *bh,
if
(
buffer_escaped
(
bd
->
bd_bh
))
{
void
*
kaddr
;
bh1
=
gfs2_log_get_buf
(
sdp
);
kaddr
=
kmap_atomic
(
bd
->
bd_bh
->
b_page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
bd
->
bd_bh
->
b_page
);
memcpy
(
bh1
->
b_data
,
kaddr
+
bh_offset
(
bd
->
bd_bh
),
bh1
->
b_size
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
*
(
__be32
*
)
bh1
->
b_data
=
0
;
clear_buffer_escaped
(
bd
->
bd_bh
);
unlock_buffer
(
bd
->
bd_bh
);
...
...
fs/gfs2/quota.c
浏览文件 @
d9349285
...
...
@@ -720,12 +720,12 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
gfs2_trans_add_bh
(
ip
->
i_gl
,
bh
,
0
);
kaddr
=
kmap_atomic
(
page
,
KM_USER0
);
kaddr
=
kmap_atomic
(
page
);
if
(
offset
+
sizeof
(
struct
gfs2_quota
)
>
PAGE_CACHE_SIZE
)
nbytes
=
PAGE_CACHE_SIZE
-
offset
;
memcpy
(
kaddr
+
offset
,
ptr
,
nbytes
);
flush_dcache_page
(
page
);
kunmap_atomic
(
kaddr
,
KM_USER0
);
kunmap_atomic
(
kaddr
);
unlock_page
(
page
);
page_cache_release
(
page
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录