From 6d5d7c6bdb4f19f9db485a774d9259d452cf220e Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Mon, 28 Oct 2019 21:42:42 +0200 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() 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 --- 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 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; } -- 1.8.3.1