Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
542d1ab3
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
542d1ab3
编写于
6月 02, 2014
作者:
J
J. Bruce Fields
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nfsd4: kill READ64
Signed-off-by:
N
J. Bruce Fields
<
bfields@redhat.com
>
上级
06553991
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
17 deletion
+16
-17
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+16
-17
未找到文件。
fs/nfsd/nfs4xdr.c
浏览文件 @
542d1ab3
...
...
@@ -98,10 +98,6 @@ xdr_error: \
status = nfserr_bad_xdr; \
goto out
#define READ64(x) do { \
(x) = (u64)ntohl(*p++) << 32; \
(x) |= ntohl(*p++); \
} while (0)
#define READMEM(x,nbytes) do { \
x = (char *)p; \
p += XDR_QUADLEN(nbytes); \
...
...
@@ -269,6 +265,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
{
int
expected_len
,
len
=
0
;
u32
dummy32
;
u64
sec
;
char
*
buf
;
DECODE_HEAD
;
...
...
@@ -282,7 +279,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
if
(
bmval
[
0
]
&
FATTR4_WORD0_SIZE
)
{
READ_BUF
(
8
);
len
+=
8
;
READ64
(
iattr
->
ia_size
);
p
=
xdr_decode_hyper
(
p
,
&
iattr
->
ia_size
);
iattr
->
ia_valid
|=
ATTR_SIZE
;
}
if
(
bmval
[
0
]
&
FATTR4_WORD0_ACL
)
{
...
...
@@ -365,7 +362,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
all 32 bits of 'nseconds'. */
READ_BUF
(
12
);
len
+=
12
;
READ64
(
iattr
->
ia_atime
.
tv_sec
);
p
=
xdr_decode_hyper
(
p
,
&
sec
);
iattr
->
ia_atime
.
tv_sec
=
(
time_t
)
sec
;
iattr
->
ia_atime
.
tv_nsec
=
be32_to_cpup
(
p
++
);
if
(
iattr
->
ia_atime
.
tv_nsec
>=
(
u32
)
1000000000
)
return
nfserr_inval
;
...
...
@@ -388,7 +386,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
all 32 bits of 'nseconds'. */
READ_BUF
(
12
);
len
+=
12
;
READ64
(
iattr
->
ia_mtime
.
tv_sec
);
p
=
xdr_decode_hyper
(
p
,
&
sec
);
iattr
->
ia_mtime
.
tv_sec
=
sec
;
iattr
->
ia_mtime
.
tv_nsec
=
be32_to_cpup
(
p
++
);
if
(
iattr
->
ia_mtime
.
tv_nsec
>=
(
u32
)
1000000000
)
return
nfserr_inval
;
...
...
@@ -583,7 +582,7 @@ nfsd4_decode_commit(struct nfsd4_compoundargs *argp, struct nfsd4_commit *commit
DECODE_HEAD
;
READ_BUF
(
12
);
READ64
(
commit
->
co_offset
);
p
=
xdr_decode_hyper
(
p
,
&
commit
->
co_offset
);
commit
->
co_count
=
be32_to_cpup
(
p
++
);
DECODE_TAIL
;
...
...
@@ -671,8 +670,8 @@ nfsd4_decode_lock(struct nfsd4_compoundargs *argp, struct nfsd4_lock *lock)
if
((
lock
->
lk_type
<
NFS4_READ_LT
)
||
(
lock
->
lk_type
>
NFS4_WRITEW_LT
))
goto
xdr_error
;
lock
->
lk_reclaim
=
be32_to_cpup
(
p
++
);
READ64
(
lock
->
lk_offset
);
READ64
(
lock
->
lk_length
);
p
=
xdr_decode_hyper
(
p
,
&
lock
->
lk_offset
);
p
=
xdr_decode_hyper
(
p
,
&
lock
->
lk_length
);
lock
->
lk_is_new
=
be32_to_cpup
(
p
++
);
if
(
lock
->
lk_is_new
)
{
...
...
@@ -707,8 +706,8 @@ nfsd4_decode_lockt(struct nfsd4_compoundargs *argp, struct nfsd4_lockt *lockt)
lockt
->
lt_type
=
be32_to_cpup
(
p
++
);
if
((
lockt
->
lt_type
<
NFS4_READ_LT
)
||
(
lockt
->
lt_type
>
NFS4_WRITEW_LT
))
goto
xdr_error
;
READ64
(
lockt
->
lt_offset
);
READ64
(
lockt
->
lt_length
);
p
=
xdr_decode_hyper
(
p
,
&
lockt
->
lt_offset
);
p
=
xdr_decode_hyper
(
p
,
&
lockt
->
lt_length
);
COPYMEM
(
&
lockt
->
lt_clientid
,
8
);
lockt
->
lt_owner
.
len
=
be32_to_cpup
(
p
++
);
READ_BUF
(
lockt
->
lt_owner
.
len
);
...
...
@@ -731,8 +730,8 @@ nfsd4_decode_locku(struct nfsd4_compoundargs *argp, struct nfsd4_locku *locku)
if
(
status
)
return
status
;
READ_BUF
(
16
);
READ64
(
locku
->
lu_offset
);
READ64
(
locku
->
lu_length
);
p
=
xdr_decode_hyper
(
p
,
&
locku
->
lu_offset
);
p
=
xdr_decode_hyper
(
p
,
&
locku
->
lu_length
);
DECODE_TAIL
;
}
...
...
@@ -1018,7 +1017,7 @@ nfsd4_decode_read(struct nfsd4_compoundargs *argp, struct nfsd4_read *read)
if
(
status
)
return
status
;
READ_BUF
(
12
);
READ64
(
read
->
rd_offset
);
p
=
xdr_decode_hyper
(
p
,
&
read
->
rd_offset
);
read
->
rd_length
=
be32_to_cpup
(
p
++
);
DECODE_TAIL
;
...
...
@@ -1030,7 +1029,7 @@ nfsd4_decode_readdir(struct nfsd4_compoundargs *argp, struct nfsd4_readdir *read
DECODE_HEAD
;
READ_BUF
(
24
);
READ64
(
readdir
->
rd_cookie
);
p
=
xdr_decode_hyper
(
p
,
&
readdir
->
rd_cookie
);
COPYMEM
(
readdir
->
rd_verf
.
data
,
sizeof
(
readdir
->
rd_verf
.
data
));
readdir
->
rd_dircount
=
be32_to_cpup
(
p
++
);
readdir
->
rd_maxcount
=
be32_to_cpup
(
p
++
);
...
...
@@ -1203,7 +1202,7 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
if
(
status
)
return
status
;
READ_BUF
(
16
);
READ64
(
write
->
wr_offset
);
p
=
xdr_decode_hyper
(
p
,
&
write
->
wr_offset
);
write
->
wr_stable_how
=
be32_to_cpup
(
p
++
);
if
(
write
->
wr_stable_how
>
2
)
goto
xdr_error
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录