Whamcloud - gitweb
LU-13101 llite: eviction during ll_open_cleanup() 47/38147/2
authorAndriy Skulysh <c17819@cray.com>
Tue, 25 Feb 2020 16:04:32 +0000 (11:04 -0500)
committerOleg Drokin <green@whamcloud.com>
Sun, 19 Apr 2020 08:49:49 +0000 (08:49 +0000)
On error ll_open_cleanup() is called while
intent lock remains pinned. So eviction can
happen while close request waits for a mod rpc slot.

Release intent lock before ll_open_cleanup()

Lustre-change: https://review.whamcloud.com/37096
Lustre-commit: 6d5d7c6bdb4f19f9db485a774d9259d452cf220e

Change-Id: Ia422351f3f54fc652078f742f2ead0bf278c9d17
Cray-bug-id: LUS-8055
Signed-off-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Vitaly Fertman <c17818@cray.com>
Reviewed-on: https://review.whamcloud.com/37096
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/38147
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
lustre/llite/llite_lib.c
lustre/llite/namei.c

index 35e68a5..d2515c4 100644 (file)
@@ -2467,8 +2467,10 @@ out:
        md_free_lustre_md(sbi->ll_md_exp, &md);
 
 cleanup:
-       if (rc != 0 && it != NULL && it->it_op & IT_OPEN)
+       if (rc != 0 && it != NULL && it->it_op & IT_OPEN) {
+               ll_intent_drop_lock(it);
                ll_open_cleanup(sb != NULL ? sb : (*inode)->i_sb, req);
+       }
 
        return rc;
 }
index 443eac8..91e0026 100644 (file)
@@ -700,8 +700,10 @@ static int ll_lookup_it_finish(struct ptlrpc_request *request,
        GOTO(out, rc = 0);
 
 out:
-       if (rc != 0 && it->it_op & IT_OPEN)
+       if (rc != 0 && it->it_op & IT_OPEN) {
+               ll_intent_drop_lock(it);
                ll_open_cleanup((*de)->d_sb, request);
+       }
 
        return rc;
 }