Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
f26c7a78
Commit
f26c7a78
authored
Mar 11, 2009
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Clean up decode_getfattr()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
bca79478
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
21 deletions
+57
-21
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+57
-21
No files found.
fs/nfs/nfs4xdr.c
View file @
f26c7a78
...
...
@@ -2996,55 +2996,91 @@ static int decode_getfattr(struct xdr_stream *xdr, struct nfs_fattr *fattr, cons
umode_t
fmode
=
0
;
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
;
if
((
status
=
decode_attr_bitmap
(
xdr
,
bitmap
))
!=
0
)
status
=
decode_attr_bitmap
(
xdr
,
bitmap
);
if
(
status
<
0
)
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
;
if
((
status
=
decode_attr_type
(
xdr
,
bitmap
,
&
type
))
!=
0
)
status
=
decode_attr_type
(
xdr
,
bitmap
,
&
type
);
if
(
status
<
0
)
goto
xdr_error
;
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
;
if
((
status
=
decode_attr_size
(
xdr
,
bitmap
,
&
fattr
->
size
))
!=
0
)
status
=
decode_attr_size
(
xdr
,
bitmap
,
&
fattr
->
size
);
if
(
status
<
0
)
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
;
if
((
status
=
decode_attr_fileid
(
xdr
,
bitmap
,
&
fattr
->
fileid
))
!=
0
)
status
=
decode_attr_fileid
(
xdr
,
bitmap
,
&
fattr
->
fileid
);
if
(
status
<
0
)
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
,
fattr
)))
!=
0
)
fattr
));
if
(
status
<
0
)
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
;
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
;
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
;
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
;
if
((
status
=
decode_attr_rdev
(
xdr
,
bitmap
,
&
fattr
->
rdev
))
!=
0
)
status
=
decode_attr_rdev
(
xdr
,
bitmap
,
&
fattr
->
rdev
);
if
(
status
<
0
)
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
;
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
;
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
;
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
;
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
;
if
(
fattr
->
fileid
==
0
&&
fileid
!=
0
)
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
;
xdr_error:
dprintk
(
"%s: xdr returned %d
\n
"
,
__func__
,
-
status
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment