]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during session resets
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 2 Aug 2011 18:46:52 +0000 (14:46 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 4 Aug 2011 15:55:35 +0000 (11:55 -0400)
commit54aa7ea4550ee9e974f1ad90d64fb31d2938b50a
treeb9f7e2af9c35fcee44eb33c7cbde276885b3285c
parent8c0a53419101714718880416a9dab41efaaecdc0
NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during session resets

If the client is in the process of resetting the session when it receives
a callback, then returning NFS4ERR_DELAY may cause a deadlock with the
DESTROY_SESSION call.

Basically, if the client returns NFS4ERR_DELAY in response to the
CB_SEQUENCE call, then the server is entitled to believe that the
client is busy because it is already processing that call. In that
case, the server is perfectly entitled to respond with a
NFS4ERR_BACK_CHAN_BUSY to any DESTROY_SESSION call.

Fix this by having the client reply with a NFS4ERR_BADSESSION in
response to the callback if it is resetting the session.

Cc: stable@kernel.org [2.6.38+]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback_proc.c