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
b7a0c8f6
Commit
b7a0c8f6
authored
Nov 03, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSD: Replace READ* macros in nfsd4_decode_test_stateid()
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
cf907b11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
36 deletions
+25
-36
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+25
-36
No files found.
fs/nfsd/nfs4xdr.c
View file @
b7a0c8f6
...
@@ -1738,42 +1738,6 @@ nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
...
@@ -1738,42 +1738,6 @@ nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
return
nfsd4_decode_stateid4
(
argp
,
&
free_stateid
->
fr_stateid
);
return
nfsd4_decode_stateid4
(
argp
,
&
free_stateid
->
fr_stateid
);
}
}
static
__be32
nfsd4_decode_test_stateid
(
struct
nfsd4_compoundargs
*
argp
,
struct
nfsd4_test_stateid
*
test_stateid
)
{
int
i
;
__be32
*
p
,
status
;
struct
nfsd4_test_stateid_id
*
stateid
;
READ_BUF
(
4
);
test_stateid
->
ts_num_ids
=
ntohl
(
*
p
++
);
INIT_LIST_HEAD
(
&
test_stateid
->
ts_stateid_list
);
for
(
i
=
0
;
i
<
test_stateid
->
ts_num_ids
;
i
++
)
{
stateid
=
svcxdr_tmpalloc
(
argp
,
sizeof
(
*
stateid
));
if
(
!
stateid
)
{
status
=
nfserrno
(
-
ENOMEM
);
goto
out
;
}
INIT_LIST_HEAD
(
&
stateid
->
ts_id_list
);
list_add_tail
(
&
stateid
->
ts_id_list
,
&
test_stateid
->
ts_stateid_list
);
status
=
nfsd4_decode_stateid
(
argp
,
&
stateid
->
ts_id_stateid
);
if
(
status
)
goto
out
;
}
status
=
0
;
out:
return
status
;
xdr_error:
dprintk
(
"NFSD: xdr error (%s:%d)
\n
"
,
__FILE__
,
__LINE__
);
status
=
nfserr_bad_xdr
;
goto
out
;
}
static
__be32
nfsd4_decode_destroy_clientid
(
struct
nfsd4_compoundargs
*
argp
,
struct
nfsd4_destroy_clientid
*
dc
)
static
__be32
nfsd4_decode_destroy_clientid
(
struct
nfsd4_compoundargs
*
argp
,
struct
nfsd4_destroy_clientid
*
dc
)
{
{
DECODE_HEAD
;
DECODE_HEAD
;
...
@@ -1919,6 +1883,31 @@ nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
...
@@ -1919,6 +1883,31 @@ nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
return
nfs_ok
;
return
nfs_ok
;
}
}
static
__be32
nfsd4_decode_test_stateid
(
struct
nfsd4_compoundargs
*
argp
,
struct
nfsd4_test_stateid
*
test_stateid
)
{
struct
nfsd4_test_stateid_id
*
stateid
;
__be32
status
;
u32
i
;
if
(
xdr_stream_decode_u32
(
argp
->
xdr
,
&
test_stateid
->
ts_num_ids
)
<
0
)
return
nfserr_bad_xdr
;
INIT_LIST_HEAD
(
&
test_stateid
->
ts_stateid_list
);
for
(
i
=
0
;
i
<
test_stateid
->
ts_num_ids
;
i
++
)
{
stateid
=
svcxdr_tmpalloc
(
argp
,
sizeof
(
*
stateid
));
if
(
!
stateid
)
return
nfserrno
(
-
ENOMEM
);
/* XXX: not jukebox? */
INIT_LIST_HEAD
(
&
stateid
->
ts_id_list
);
list_add_tail
(
&
stateid
->
ts_id_list
,
&
test_stateid
->
ts_stateid_list
);
status
=
nfsd4_decode_stateid4
(
argp
,
&
stateid
->
ts_id_stateid
);
if
(
status
)
return
status
;
}
return
nfs_ok
;
}
static
__be32
static
__be32
nfsd4_decode_fallocate
(
struct
nfsd4_compoundargs
*
argp
,
nfsd4_decode_fallocate
(
struct
nfsd4_compoundargs
*
argp
,
struct
nfsd4_fallocate
*
fallocate
)
struct
nfsd4_fallocate
*
fallocate
)
...
...
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