NFS: Handle NFS4ERR_LEASE_MOVED during async RENEW
authorChuck Lever <chuck.lever@oracle.com>
Thu, 17 Oct 2013 18:13:53 +0000 (14:13 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 28 Oct 2013 19:30:52 +0000 (15:30 -0400)
With NFSv4 minor version 0, the asynchronous lease RENEW
heartbeat can return NFS4ERR_LEASE_MOVED.  Error recovery logic for
async RENEW is a separate code path from the generic NFS proc paths,
so it must be updated to handle NFS4ERR_LEASE_MOVED as well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 9f2ccf7471eef4ca79555561a2f55ccc48eebd4f..8aa8ff3fd5e769e30198b977534821f957e2562d 100644 (file)
@@ -4235,7 +4235,13 @@ static void nfs4_renew_done(struct rpc_task *task, void *calldata)
        unsigned long timestamp = data->timestamp;
 
        trace_nfs4_renew_async(clp, task->tk_status);
-       if (task->tk_status < 0) {
+       switch (task->tk_status) {
+       case 0:
+               break;
+       case -NFS4ERR_LEASE_MOVED:
+               nfs4_schedule_lease_moved_recovery(clp);
+               break;
+       default:
                /* Unless we're shutting down, schedule state recovery! */
                if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) == 0)
                        return;