]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
NFSv4: Don't call nfs4_state_mark_reclaim_reboot() from error handlers
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 4 Oct 2010 21:59:08 +0000 (17:59 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:20 +0000 (13:32 -0800)
commitbd863c343d97ab03f066ddda091d0ddc6f0e1255
treed8e28bb7f407a25314de92aaf39b42e9aa340106
parent4e16957a4c2b79a4bfb9b294e6060cbc257dd094
NFSv4: Don't call nfs4_state_mark_reclaim_reboot() from error handlers

commit ae1007d37e00144b72906a4bdc47d517ae91bcc1 upstream.

In the case of a server reboot, the state recovery thread starts by calling
nfs4_state_end_reclaim_reboot() in order to avoid edge conditions when
the server reboots while the client is in the middle of recovery.

However, if the client has already marked the nfs4_state as requiring
reboot recovery, then the above behaviour will cause the recovery thread to
treat the open as if it was part of such an edge condition: the open will
be recovered as if it was part of a lease expiration (and all the locks
will be lost).
Fix is to remove the call to nfs4_state_mark_reclaim_reboot from
nfs4_async_handle_error(), and nfs4_handle_exception(). Instead we leave it
to the recovery thread to do this for us.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/nfs4proc.c