Whamcloud - gitweb
LU-13101 llite: eviction during ll_open_cleanup() 96/37096/2
authorAndriy Skulysh <c17819@cray.com>
Mon, 28 Oct 2019 19:42:42 +0000 (21:42 +0200)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Jan 2020 06:02:22 +0000 (06:02 +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()

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>
lustre/llite/llite_lib.c
lustre/llite/namei.c

index d7557fa..e8e240b 100644 (file)
@@ -2610,8 +2610,10 @@ out:
        /* cleanup will be done if necessary */
        md_free_lustre_md(sbi->ll_md_exp, &md);
 
-       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 5628adf..43265ab 100644 (file)
@@ -721,8 +721,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;
 }