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
78315b36
Commit
78315b36
authored
Oct 22, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Update the NFSv3 CREATE family of encoders to use struct xdr_stream
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
ecb7a085
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
fs/nfsd/nfs3xdr.c
fs/nfsd/nfs3xdr.c
+28
-7
No files found.
fs/nfsd/nfs3xdr.c
View file @
78315b36
...
...
@@ -121,6 +121,17 @@ svcxdr_encode_nfs_fh3(struct xdr_stream *xdr, const struct svc_fh *fhp)
return
true
;
}
static
bool
svcxdr_encode_post_op_fh3
(
struct
xdr_stream
*
xdr
,
const
struct
svc_fh
*
fhp
)
{
if
(
xdr_stream_encode_item_present
(
xdr
)
<
0
)
return
false
;
if
(
!
svcxdr_encode_nfs_fh3
(
xdr
,
fhp
))
return
false
;
return
true
;
}
static
__be32
*
encode_fh
(
__be32
*
p
,
struct
svc_fh
*
fhp
)
{
...
...
@@ -1079,16 +1090,26 @@ nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p)
int
nfs3svc_encode_createres
(
struct
svc_rqst
*
rqstp
,
__be32
*
p
)
{
struct
xdr_stream
*
xdr
=
&
rqstp
->
rq_res_stream
;
struct
nfsd3_diropres
*
resp
=
rqstp
->
rq_resp
;
*
p
++
=
resp
->
status
;
if
(
resp
->
status
==
0
)
{
*
p
++
=
xdr_one
;
p
=
encode_fh
(
p
,
&
resp
->
fh
);
p
=
encode_post_op_attr
(
rqstp
,
p
,
&
resp
->
fh
);
if
(
!
svcxdr_encode_nfsstat3
(
xdr
,
resp
->
status
))
return
0
;
switch
(
resp
->
status
)
{
case
nfs_ok
:
if
(
!
svcxdr_encode_post_op_fh3
(
xdr
,
&
resp
->
fh
))
return
0
;
if
(
!
svcxdr_encode_post_op_attr
(
rqstp
,
xdr
,
&
resp
->
fh
))
return
0
;
if
(
!
svcxdr_encode_wcc_data
(
rqstp
,
xdr
,
&
resp
->
dirfh
))
return
0
;
break
;
default:
if
(
!
svcxdr_encode_wcc_data
(
rqstp
,
xdr
,
&
resp
->
dirfh
))
return
0
;
}
p
=
encode_wcc_data
(
rqstp
,
p
,
&
resp
->
dirfh
);
return
xdr_ressize_check
(
rqstp
,
p
)
;
return
1
;
}
/* RENAME */
...
...
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