Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
f26c7a78
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f26c7a78
编写于
3月 11, 2009
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv4: Clean up decode_getfattr()
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
bca79478
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
57 addition
and
21 deletion
+57
-21
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+57
-21
未找到文件。
fs/nfs/nfs4xdr.c
浏览文件 @
f26c7a78
...
@@ -2996,55 +2996,91 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons
...
@@ -2996,55 +2996,91 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons
umode_t
fmode
=
0
;
umode_t
fmode
=
0
;
uint64_t
fileid
;
uint64_t
fileid
;
if
((
status
=
decode_op_hdr
(
xdr
,
OP_GETATTR
))
!=
0
)
status
=
decode_op_hdr
(
xdr
,
OP_GETATTR
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_bitmap
(
xdr
,
bitmap
))
!=
0
)
status
=
decode_attr_bitmap
(
xdr
,
bitmap
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_length
(
xdr
,
&
attrlen
,
&
savep
))
!=
0
)
status
=
decode_attr_length
(
xdr
,
&
attrlen
,
&
savep
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_type
(
xdr
,
bitmap
,
&
type
))
!=
0
)
status
=
decode_attr_type
(
xdr
,
bitmap
,
&
type
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
fattr
->
mode
=
nfs_type2fmt
[
type
];
fattr
->
mode
=
nfs_type2fmt
[
type
];
if
((
status
=
decode_attr_change
(
xdr
,
bitmap
,
&
fattr
->
change_attr
))
!=
0
)
status
=
decode_attr_change
(
xdr
,
bitmap
,
&
fattr
->
change_attr
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_size
(
xdr
,
bitmap
,
&
fattr
->
size
))
!=
0
)
status
=
decode_attr_size
(
xdr
,
bitmap
,
&
fattr
->
size
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_fsid
(
xdr
,
bitmap
,
&
fattr
->
fsid
))
!=
0
)
status
=
decode_attr_fsid
(
xdr
,
bitmap
,
&
fattr
->
fsid
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_fileid
(
xdr
,
bitmap
,
&
fattr
->
fileid
))
!=
0
)
status
=
decode_attr_fileid
(
xdr
,
bitmap
,
&
fattr
->
fileid
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_fs_locations
(
xdr
,
bitmap
,
container_of
(
fattr
,
status
=
decode_attr_fs_locations
(
xdr
,
bitmap
,
container_of
(
fattr
,
struct
nfs4_fs_locations
,
struct
nfs4_fs_locations
,
fattr
)))
!=
0
)
fattr
));
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_mode
(
xdr
,
bitmap
,
&
fmode
))
!=
0
)
status
=
decode_attr_mode
(
xdr
,
bitmap
,
&
fmode
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
fattr
->
mode
|=
fmode
;
fattr
->
mode
|=
fmode
;
if
((
status
=
decode_attr_nlink
(
xdr
,
bitmap
,
&
fattr
->
nlink
))
!=
0
)
status
=
decode_attr_nlink
(
xdr
,
bitmap
,
&
fattr
->
nlink
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_owner
(
xdr
,
bitmap
,
server
->
nfs_client
,
&
fattr
->
uid
))
!=
0
)
status
=
decode_attr_owner
(
xdr
,
bitmap
,
server
->
nfs_client
,
&
fattr
->
uid
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_group
(
xdr
,
bitmap
,
server
->
nfs_client
,
&
fattr
->
gid
))
!=
0
)
status
=
decode_attr_group
(
xdr
,
bitmap
,
server
->
nfs_client
,
&
fattr
->
gid
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_rdev
(
xdr
,
bitmap
,
&
fattr
->
rdev
))
!=
0
)
status
=
decode_attr_rdev
(
xdr
,
bitmap
,
&
fattr
->
rdev
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_space_used
(
xdr
,
bitmap
,
&
fattr
->
du
.
nfs3
.
used
))
!=
0
)
status
=
decode_attr_space_used
(
xdr
,
bitmap
,
&
fattr
->
du
.
nfs3
.
used
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_time_access
(
xdr
,
bitmap
,
&
fattr
->
atime
))
!=
0
)
status
=
decode_attr_time_access
(
xdr
,
bitmap
,
&
fattr
->
atime
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_time_metadata
(
xdr
,
bitmap
,
&
fattr
->
ctime
))
!=
0
)
status
=
decode_attr_time_metadata
(
xdr
,
bitmap
,
&
fattr
->
ctime
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_time_modify
(
xdr
,
bitmap
,
&
fattr
->
mtime
))
!=
0
)
status
=
decode_attr_time_modify
(
xdr
,
bitmap
,
&
fattr
->
mtime
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
((
status
=
decode_attr_mounted_on_fileid
(
xdr
,
bitmap
,
&
fileid
))
!=
0
)
status
=
decode_attr_mounted_on_fileid
(
xdr
,
bitmap
,
&
fileid
);
if
(
status
<
0
)
goto
xdr_error
;
goto
xdr_error
;
if
(
fattr
->
fileid
==
0
&&
fileid
!=
0
)
if
(
fattr
->
fileid
==
0
&&
fileid
!=
0
)
fattr
->
fileid
=
fileid
;
fattr
->
fileid
=
fileid
;
if
((
status
=
verify_attr_len
(
xdr
,
savep
,
attrlen
))
==
0
)
status
=
verify_attr_len
(
xdr
,
savep
,
attrlen
);
if
(
status
==
0
)
fattr
->
valid
=
NFS_ATTR_FATTR_V4
;
fattr
->
valid
=
NFS_ATTR_FATTR_V4
;
xdr_error:
xdr_error:
dprintk
(
"%s: xdr returned %d
\n
"
,
__func__
,
-
status
);
dprintk
(
"%s: xdr returned %d
\n
"
,
__func__
,
-
status
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录