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
830c7150
Commit
830c7150
authored
Nov 04, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Replace READ* macros in nfsd4_decode_xattr_name()
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
3dfd0b0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+9
-12
No files found.
fs/nfsd/nfs4xdr.c
View file @
830c7150
...
...
@@ -2117,25 +2117,22 @@ nfsd4_vbuf_from_vector(struct nfsd4_compoundargs *argp, struct xdr_buf *xdr,
static
__be32
nfsd4_decode_xattr_name
(
struct
nfsd4_compoundargs
*
argp
,
char
**
namep
)
{
DECODE_HEAD
;
char
*
name
,
*
sp
,
*
dp
;
u32
namelen
,
cnt
;
__be32
*
p
;
READ_BUF
(
4
);
namelen
=
be32_to_cpup
(
p
++
);
if
(
xdr_stream_decode_u32
(
argp
->
xdr
,
&
namelen
)
<
0
)
return
nfserr_bad_xdr
;
if
(
namelen
>
(
XATTR_NAME_MAX
-
XATTR_USER_PREFIX_LEN
))
return
nfserr_nametoolong
;
if
(
namelen
==
0
)
goto
xdr_erro
r
;
READ_BUF
(
namelen
);
return
nfserr_bad_xd
r
;
p
=
xdr_inline_decode
(
argp
->
xdr
,
namelen
);
if
(
!
p
)
return
nfserr_bad_xdr
;
name
=
svcxdr_tmpalloc
(
argp
,
namelen
+
XATTR_USER_PREFIX_LEN
+
1
);
if
(
!
name
)
return
nfserr_jukebox
;
memcpy
(
name
,
XATTR_USER_PREFIX
,
XATTR_USER_PREFIX_LEN
);
/*
...
...
@@ -2148,14 +2145,14 @@ nfsd4_decode_xattr_name(struct nfsd4_compoundargs *argp, char **namep)
while
(
cnt
--
>
0
)
{
if
(
*
sp
==
'\0'
)
goto
xdr_erro
r
;
return
nfserr_bad_xd
r
;
*
dp
++
=
*
sp
++
;
}
*
dp
=
'\0'
;
*
namep
=
name
;
DECODE_TAIL
;
return
nfs_ok
;
}
/*
...
...
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