]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
NFSv4: Leases are renewed in sequence_done when we have sessions
authorTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 5 Jul 2015 18:50:46 +0000 (14:50 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 15 Sep 2017 03:27:49 +0000 (20:27 -0700)
Ensure that the calls to renew_lease() in open_done() etc. only apply
to session-less versions of NFSv4.x (i.e. NFSv4.0).

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
(cherry picked from commit be824167e33a8b747423c90f72479deb03255d54)

orabug: 25513155
Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-By: Jack Vogel <jack.vogel@oracle.com>
Tested-by: xuan.qi@oracle.com
Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
fs/nfs/nfs4proc.c

index ad4474c8a870a8a55a52e969b3f57704137dd321..319ee18da70489ce5119a38a5335969ee627d51f 100644 (file)
@@ -473,7 +473,10 @@ static void do_renew_lease(struct nfs_client *clp, unsigned long timestamp)
 
 static void renew_lease(const struct nfs_server *server, unsigned long timestamp)
 {
-       do_renew_lease(server->nfs_client, timestamp);
+       struct nfs_client *clp = server->nfs_client;
+
+       if (!nfs4_has_session(clp))
+               do_renew_lease(clp, timestamp);
 }
 
 struct nfs4_call_sync_data {
@@ -7495,13 +7498,8 @@ static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred)
                goto out;
        }
        ret = rpc_wait_for_completion_task(task);
-       if (!ret) {
-               struct nfs4_sequence_res *res = task->tk_msg.rpc_resp;
-
-               if (task->tk_status == 0)
-                       nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags);
+       if (!ret)
                ret = task->tk_status;
-       }
        rpc_put_task(task);
 out:
        dprintk("<-- %s status=%d\n", __func__, ret);