From: Andriy Skulysh Date: Mon, 28 Oct 2019 19:42:42 +0000 (+0200) Subject: LU-13101 llite: eviction during ll_open_cleanup() X-Git-Tag: 2.13.52~71 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F37096%2F2;p=fs%2Flustre-release.git LU-13101 llite: eviction during ll_open_cleanup() 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 Reviewed-by: Alexander Boyko Reviewed-by: Andrew Perepechko Reviewed-by: Vitaly Fertman Reviewed-on: https://review.whamcloud.com/37096 Tested-by: jenkins Reviewed-by: Alexandr Boyko Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index d7557fa..e8e240b 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -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; } diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 5628adf..43265ab 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -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; }