From 2bc7049ba9ed341c174c590ec4d13c94697d3cdb Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Tue, 25 Feb 2020 11:04:32 -0500 Subject: [PATCH] LU-13101 llite: eviction during ll_open_cleanup() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- lustre/llite/llite_lib.c | 4 +++- lustre/llite/namei.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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; } -- 1.8.3.1