]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd4: reserve adequate space for LOCK op
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 12 Aug 2014 15:41:40 +0000 (11:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:43:10 +0000 (09:43 -0700)
commit8a3072e208d9c48e9e0073b48e5a2eb56ea88d01
tree35aef4d2788c193f2cbec26eb2d7826a5ff00826
parent9873d3330d5af98c1c7debc2310c7e0e62cc7da1
nfsd4: reserve adequate space for LOCK op

commit f7b43d0c992c3ec3e8d9285c3fb5e1e0eb0d031a upstream.

As of  8c7424cff6 "nfsd4: don't try to encode conflicting owner if low
on space", we permit the server to process a LOCK operation even if
there might not be space to return the conflicting lockowner, because
we've made returning the conflicting lockowner optional.

However, the rpc server still wants to know the most we might possibly
return, so we need to take into account the possible conflicting
lockowner in the svc_reserve_space() call here.

Symptoms were log messages like "RPC request reserved 88 but used 108".

Fixes: 8c7424cff6 "nfsd4: don't try to encode conflicting owner if low on space"
Reported-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4xdr.c