Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
951b4bd5
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
951b4bd5
编写于
6月 02, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gfs2: endianness misannotations
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
52da40ae
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
19 deletion
+16
-19
fs/gfs2/lock_dlm.c
fs/gfs2/lock_dlm.c
+4
-4
fs/gfs2/quota.c
fs/gfs2/quota.c
+10
-13
fs/gfs2/rgrp.c
fs/gfs2/rgrp.c
+2
-2
未找到文件。
fs/gfs2/lock_dlm.c
浏览文件 @
951b4bd5
...
...
@@ -466,19 +466,19 @@ static void gdlm_cancel(struct gfs2_glock *gl)
static
void
control_lvb_read
(
struct
lm_lockstruct
*
ls
,
uint32_t
*
lvb_gen
,
char
*
lvb_bits
)
{
uint32_t
gen
;
__le32
gen
;
memcpy
(
lvb_bits
,
ls
->
ls_control_lvb
,
GDLM_LVB_SIZE
);
memcpy
(
&
gen
,
lvb_bits
,
sizeof
(
uint32_t
));
memcpy
(
&
gen
,
lvb_bits
,
sizeof
(
__le32
));
*
lvb_gen
=
le32_to_cpu
(
gen
);
}
static
void
control_lvb_write
(
struct
lm_lockstruct
*
ls
,
uint32_t
lvb_gen
,
char
*
lvb_bits
)
{
uint32_t
gen
;
__le32
gen
;
memcpy
(
ls
->
ls_control_lvb
,
lvb_bits
,
GDLM_LVB_SIZE
);
gen
=
cpu_to_le32
(
lvb_gen
);
memcpy
(
ls
->
ls_control_lvb
,
&
gen
,
sizeof
(
uint32_t
));
memcpy
(
ls
->
ls_control_lvb
,
&
gen
,
sizeof
(
__le32
));
}
static
int
all_jid_bits_clear
(
char
*
lvb
)
...
...
fs/gfs2/quota.c
浏览文件 @
951b4bd5
...
...
@@ -667,7 +667,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
struct
buffer_head
*
bh
;
struct
page
*
page
;
void
*
kaddr
,
*
ptr
;
struct
gfs2_quota
q
,
*
qp
;
struct
gfs2_quota
q
;
int
err
,
nbytes
;
u64
size
;
...
...
@@ -683,28 +683,25 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
return
err
;
err
=
-
EIO
;
qp
=
&
q
;
qp
->
qu_value
=
be64_to_cpu
(
qp
->
qu_value
);
qp
->
qu_value
+=
change
;
qp
->
qu_value
=
cpu_to_be64
(
qp
->
qu_value
);
qd
->
qd_qb
.
qb_value
=
qp
->
qu_value
;
be64_add_cpu
(
&
q
.
qu_value
,
change
);
qd
->
qd_qb
.
qb_value
=
q
.
qu_value
;
if
(
fdq
)
{
if
(
fdq
->
d_fieldmask
&
FS_DQ_BSOFT
)
{
q
p
->
qu_warn
=
cpu_to_be64
(
fdq
->
d_blk_softlimit
>>
sdp
->
sd_fsb2bb_shift
);
qd
->
qd_qb
.
qb_warn
=
q
p
->
qu_warn
;
q
.
qu_warn
=
cpu_to_be64
(
fdq
->
d_blk_softlimit
>>
sdp
->
sd_fsb2bb_shift
);
qd
->
qd_qb
.
qb_warn
=
q
.
qu_warn
;
}
if
(
fdq
->
d_fieldmask
&
FS_DQ_BHARD
)
{
q
p
->
qu_limit
=
cpu_to_be64
(
fdq
->
d_blk_hardlimit
>>
sdp
->
sd_fsb2bb_shift
);
qd
->
qd_qb
.
qb_limit
=
q
p
->
qu_limit
;
q
.
qu_limit
=
cpu_to_be64
(
fdq
->
d_blk_hardlimit
>>
sdp
->
sd_fsb2bb_shift
);
qd
->
qd_qb
.
qb_limit
=
q
.
qu_limit
;
}
if
(
fdq
->
d_fieldmask
&
FS_DQ_BCOUNT
)
{
q
p
->
qu_value
=
cpu_to_be64
(
fdq
->
d_bcount
>>
sdp
->
sd_fsb2bb_shift
);
qd
->
qd_qb
.
qb_value
=
q
p
->
qu_value
;
q
.
qu_value
=
cpu_to_be64
(
fdq
->
d_bcount
>>
sdp
->
sd_fsb2bb_shift
);
qd
->
qd_qb
.
qb_value
=
q
.
qu_value
;
}
}
/* Write the quota into the quota file on disk */
ptr
=
qp
;
ptr
=
&
q
;
nbytes
=
sizeof
(
struct
gfs2_quota
);
get_a_page:
page
=
find_or_create_page
(
mapping
,
index
,
GFP_NOFS
);
...
...
fs/gfs2/rgrp.c
浏览文件 @
951b4bd5
...
...
@@ -1127,7 +1127,7 @@ int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd)
rgd
->
rd_flags
|=
(
GFS2_RDF_UPTODATE
|
GFS2_RDF_CHECK
);
rgd
->
rd_free_clone
=
rgd
->
rd_free
;
}
if
(
be32_to_cpu
(
GFS2_MAGIC
)
!=
rgd
->
rd_rgl
->
rl_magic
)
{
if
(
cpu_to_be32
(
GFS2_MAGIC
)
!=
rgd
->
rd_rgl
->
rl_magic
)
{
rgd
->
rd_rgl
->
rl_unlinked
=
cpu_to_be32
(
count_unlinked
(
rgd
));
gfs2_rgrp_ondisk2lvb
(
rgd
->
rd_rgl
,
rgd
->
rd_bits
[
0
].
bi_bh
->
b_data
);
...
...
@@ -1161,7 +1161,7 @@ int update_rgrp_lvb(struct gfs2_rgrpd *rgd)
if
(
rgd
->
rd_flags
&
GFS2_RDF_UPTODATE
)
return
0
;
if
(
be32_to_cpu
(
GFS2_MAGIC
)
!=
rgd
->
rd_rgl
->
rl_magic
)
if
(
cpu_to_be32
(
GFS2_MAGIC
)
!=
rgd
->
rd_rgl
->
rl_magic
)
return
gfs2_rgrp_bh_get
(
rgd
);
rl_flags
=
be32_to_cpu
(
rgd
->
rd_rgl
->
rl_flags
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录