NFSD: Clean up the test_stateid function
When I initially wrote it, I didn't understand how lists worked so I wrote something that didn't use them. I think making a list of stateids to test is a more straightforward implementation, especially compared to especially compared to decoding stateids while simultaneously encoding a reply to the client. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
de5b8e8e04
commit
03cfb42025
@@ -3402,7 +3402,14 @@ __be32
|
||||
nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
||||
struct nfsd4_test_stateid *test_stateid)
|
||||
{
|
||||
/* real work is done during encoding */
|
||||
struct nfsd4_test_stateid_id *stateid;
|
||||
struct nfs4_client *cl = cstate->session->se_client;
|
||||
|
||||
nfs4_lock_state();
|
||||
list_for_each_entry(stateid, &test_stateid->ts_stateid_list, ts_id_list)
|
||||
stateid->ts_id_status = nfs4_validate_stateid(cl, &stateid->ts_id_stateid);
|
||||
nfs4_unlock_state();
|
||||
|
||||
return nfs_ok;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user