From: Andriy Skulysh Date: Tue, 25 Feb 2020 16:04:32 +0000 (-0500) Subject: LU-13101 llite: eviction during ll_open_cleanup() X-Git-Tag: 2.12.5-RC1~41 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2bc7049ba9ed341c174c590ec4d13c94697d3cdb;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() Lustre-change: https://review.whamcloud.com/37096 Lustre-commit: 6d5d7c6bdb4f19f9db485a774d9259d452cf220e 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 Reviewed-on: https://review.whamcloud.com/38147 Reviewed-by: Alexander Boyko --- diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 35e68a5..d2515c4 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -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; } diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 443eac8..91e0026 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -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; }