aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-02-13 16:39:00 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-02-14 17:01:29 -0500
commit73e79482b40fb6671915e3da0d178862a07ef254 (patch)
tree15a12f909e7c4c6ba1691c3d1448ec42a9b65d5a /fs/nfsd/nfs4xdr.c
parentf6d82485e9a947ae19bb29e72644f4c6f27d5b89 (diff)
nfsd4: rearrange struct nfsd4_slot
Combine two booleans into a single flag field, move the smaller fields to the end. (In practice this doesn't make the struct any smaller. But we'll be adding another flag here soon.) Remove some debugging code that doesn't look useful, while we're in the neighborhood. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 0ec5a1b9700e..279a70548e47 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3532,7 +3532,7 @@ int nfsd4_check_resp_size(struct nfsd4_compoundres *resp, u32 pad)
3532 if (length > session->se_fchannel.maxresp_sz) 3532 if (length > session->se_fchannel.maxresp_sz)
3533 return nfserr_rep_too_big; 3533 return nfserr_rep_too_big;
3534 3534
3535 if (slot->sl_cachethis == 1 && 3535 if ((slot->sl_flags & NFSD4_SLOT_CACHETHIS) &&
3536 length > session->se_fchannel.maxresp_cached) 3536 length > session->se_fchannel.maxresp_cached)
3537 return nfserr_rep_too_big_to_cache; 3537 return nfserr_rep_too_big_to_cache;
3538 3538
@@ -3656,8 +3656,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
3656 if (nfsd4_has_session(cs)) { 3656 if (nfsd4_has_session(cs)) {
3657 if (cs->status != nfserr_replay_cache) { 3657 if (cs->status != nfserr_replay_cache) {
3658 nfsd4_store_cache_entry(resp); 3658 nfsd4_store_cache_entry(resp);
3659 dprintk("%s: SET SLOT STATE TO AVAILABLE\n", __func__); 3659 cs->slot->sl_flags &= ~NFSD4_SLOT_INUSE;
3660 cs->slot->sl_inuse = false;
3661 } 3660 }
3662 /* Renew the clientid on success and on replay */ 3661 /* Renew the clientid on success and on replay */
3663 release_session_client(cs->session); 3662 release_session_client(cs->session);