nfsd4: don't try to encode conflicting owner if low on space
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 10 Mar 2014 16:19:10 +0000 (12:19 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 30 May 2014 21:31:55 +0000 (17:31 -0400)
commit8c7424cff6bd33459945646cfcbf6dc6c899ab24
treeb407f5e3603364585e1116cf9300b449a262a85b
parentf5236013a21c118e9d317e90c7a152dfe51fab93
nfsd4: don't try to encode conflicting owner if low on space

I ran into this corner case in testing: in theory clients can provide
state owners up to 1024 bytes long.  In the sessions case there might be
a risk of this pushing us over the DRC slot size.

The conflicting owner isn't really that important, so let's humor a
client that provides a small maxresponsize_cached by allowing ourselves
to return without the conflicting owner instead of outright failing the
operation.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4xdr.c