summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields2014-05-19 18:27:11 +0200
committerJ. Bruce Fields2014-05-23 15:03:44 +0200
commite372ba60def1af33e1c0b9bbfa5c8f8559c1ad6b (patch)
tree93ab5ea032f80a87a60bc681e809b908aaa3612c /fs/nfsd/nfs4proc.c
parentnfsd4: fix write reply size estimate (diff)
downloadkernel-qcow2-linux-e372ba60def1af33e1c0b9bbfa5c8f8559c1ad6b.tar.gz
kernel-qcow2-linux-e372ba60def1af33e1c0b9bbfa5c8f8559c1ad6b.tar.xz
kernel-qcow2-linux-e372ba60def1af33e1c0b9bbfa5c8f8559c1ad6b.zip
nfsd4: decoding errors can still be cached and require space
Currently a non-idempotent op reply may be cached if it fails in the proc code but not if it fails at xdr decoding. I doubt there are any xdr-decoding-time errors that would make this a problem in practice, so this probably isn't a serious bug. The space estimates should also take into account space required for encoding of error returns. Again, not a practical problem, though it would become one after future patches which will tighten the space estimates. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 9d60a1c08105..b0e075cd6c99 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1215,6 +1215,8 @@ static inline struct nfsd4_operation *OPDESC(struct nfsd4_op *op)
bool nfsd4_cache_this_op(struct nfsd4_op *op)
{
+ if (op->opnum == OP_ILLEGAL)
+ return false;
return OPDESC(op)->op_flags & OP_CACHEME;
}