diff options
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 480f12c4e590..7f346d8ef267 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -3901,6 +3901,14 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op) | |||
3901 | space_needed = COMPOUND_ERR_SLACK_SPACE; | 3901 | space_needed = COMPOUND_ERR_SLACK_SPACE; |
3902 | op->status = nfsd4_check_resp_size(resp, space_needed); | 3902 | op->status = nfsd4_check_resp_size(resp, space_needed); |
3903 | } | 3903 | } |
3904 | if (op->status == nfserr_resource && nfsd4_has_session(&resp->cstate)) { | ||
3905 | struct nfsd4_slot *slot = resp->cstate.slot; | ||
3906 | |||
3907 | if (slot->sl_flags & NFSD4_SLOT_CACHETHIS) | ||
3908 | op->status = nfserr_rep_too_big_to_cache; | ||
3909 | else | ||
3910 | op->status = nfserr_rep_too_big; | ||
3911 | } | ||
3904 | if (op->status == nfserr_resource || | 3912 | if (op->status == nfserr_resource || |
3905 | op->status == nfserr_rep_too_big || | 3913 | op->status == nfserr_rep_too_big || |
3906 | op->status == nfserr_rep_too_big_to_cache) { | 3914 | op->status == nfserr_rep_too_big_to_cache) { |