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
66f0476c
Commit
66f0476c
authored
Nov 19, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Replace READ* macros that decode the fattr4 umask attribute
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
dabe9182
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+9
-7
No files found.
fs/nfsd/nfs4xdr.c
View file @
66f0476c
...
...
@@ -358,7 +358,6 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
{
unsigned
int
starting_pos
;
u32
attrlist4_count
;
u32
dummy32
;
DECODE_HEAD
;
iattr
->
ia_valid
=
0
;
...
...
@@ -474,13 +473,16 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
return
status
;
}
if
(
bmval
[
2
]
&
FATTR4_WORD2_MODE_UMASK
)
{
u32
mode
,
mask
;
if
(
!
umask
)
goto
xdr_error
;
READ_BUF
(
8
);
dummy32
=
be32_to_cpup
(
p
++
);
iattr
->
ia_mode
=
dummy32
&
(
S_IFMT
|
S_IALLUGO
);
dummy32
=
be32_to_cpup
(
p
++
);
*
umask
=
dummy32
&
S_IRWXUGO
;
return
nfserr_bad_xdr
;
if
(
xdr_stream_decode_u32
(
argp
->
xdr
,
&
mode
)
<
0
)
return
nfserr_bad_xdr
;
iattr
->
ia_mode
=
mode
&
(
S_IFMT
|
S_IALLUGO
);
if
(
xdr_stream_decode_u32
(
argp
->
xdr
,
&
mask
)
<
0
)
return
nfserr_bad_xdr
;
*
umask
=
mask
&
S_IRWXUGO
;
iattr
->
ia_valid
|=
ATTR_MODE
;
}
...
...
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