summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorKinglong Mee2017-02-03 15:51:46 +0100
committerJ. Bruce Fields2017-02-17 22:26:04 +0100
commit7323f0d2881bbd426ce6bc0a956ef9e739ffe767 (patch)
tree29517f208a2624666b66be8067bb60aec5623c46 /fs/nfsd/nfs4xdr.c
parentNFSD: Get response size before operation for all RPCs (diff)
downloadkernel-qcow2-linux-7323f0d2881bbd426ce6bc0a956ef9e739ffe767.tar.gz
kernel-qcow2-linux-7323f0d2881bbd426ce6bc0a956ef9e739ffe767.tar.xz
kernel-qcow2-linux-7323f0d2881bbd426ce6bc0a956ef9e739ffe767.zip
NFSD: Reserve adequate space for LOCKT operation
After tightening the OP_LOCKT reply size estimate, we can get warnings like: [11512.783519] RPC request reserved 124 but used 152 [11512.813624] RPC request reserved 108 but used 136 Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 7e4df80456ff..382c1fd05b4c 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1941,12 +1941,12 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
} else
max_reply += nfsd4_max_reply(argp->rqstp, op);
/*
- * OP_LOCK may return a conflicting lock. (Special case
- * because it will just skip encoding this if it runs
- * out of xdr buffer space, and it is the only operation
- * that behaves this way.)
+ * OP_LOCK and OP_LOCKT may return a conflicting lock.
+ * (Special case because it will just skip encoding this
+ * if it runs out of xdr buffer space, and it is the only
+ * operation that behaves this way.)
*/
- if (op->opnum == OP_LOCK)
+ if (op->opnum == OP_LOCK || op->opnum == OP_LOCKT)
max_reply += NFS4_OPAQUE_LIMIT;
if (op->status) {