Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2212036c
Commit
2212036c
authored
Nov 04, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Replace READ* macros in nfsd4_decode_listxattrs()
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
403366a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+5
-5
No files found.
fs/nfsd/nfs4xdr.c
View file @
2212036c
...
@@ -2223,11 +2223,10 @@ static __be32
...
@@ -2223,11 +2223,10 @@ static __be32
nfsd4_decode_listxattrs
(
struct
nfsd4_compoundargs
*
argp
,
nfsd4_decode_listxattrs
(
struct
nfsd4_compoundargs
*
argp
,
struct
nfsd4_listxattrs
*
listxattrs
)
struct
nfsd4_listxattrs
*
listxattrs
)
{
{
DECODE_HEAD
;
u32
maxcount
;
u32
maxcount
;
READ_BUF
(
12
);
if
(
xdr_stream_decode_u64
(
argp
->
xdr
,
&
listxattrs
->
lsxa_cookie
)
<
0
)
p
=
xdr_decode_hyper
(
p
,
&
listxattrs
->
lsxa_cookie
)
;
return
nfserr_bad_xdr
;
/*
/*
* If the cookie is too large to have even one user.x attribute
* If the cookie is too large to have even one user.x attribute
...
@@ -2237,7 +2236,8 @@ nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
...
@@ -2237,7 +2236,8 @@ nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
(
XATTR_LIST_MAX
/
(
XATTR_USER_PREFIX_LEN
+
2
)))
(
XATTR_LIST_MAX
/
(
XATTR_USER_PREFIX_LEN
+
2
)))
return
nfserr_badcookie
;
return
nfserr_badcookie
;
maxcount
=
be32_to_cpup
(
p
++
);
if
(
xdr_stream_decode_u32
(
argp
->
xdr
,
&
maxcount
)
<
0
)
return
nfserr_bad_xdr
;
if
(
maxcount
<
8
)
if
(
maxcount
<
8
)
/* Always need at least 2 words (length and one character) */
/* Always need at least 2 words (length and one character) */
return
nfserr_inval
;
return
nfserr_inval
;
...
@@ -2245,7 +2245,7 @@ nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
...
@@ -2245,7 +2245,7 @@ nfsd4_decode_listxattrs(struct nfsd4_compoundargs *argp,
maxcount
=
min
(
maxcount
,
svc_max_payload
(
argp
->
rqstp
));
maxcount
=
min
(
maxcount
,
svc_max_payload
(
argp
->
rqstp
));
listxattrs
->
lsxa_maxcount
=
maxcount
;
listxattrs
->
lsxa_maxcount
=
maxcount
;
DECODE_TAIL
;
return
nfs_ok
;
}
}
static
__be32
static
__be32
...
...
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