From 1b166d6dd6a2f39dfe35b60be169b288665d0283 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Fri, 4 Jun 2021 11:58:29 +0800 Subject: [PATCH 1/1] LU-14780 llite: failed ASSERTION(ldlm_has_layout(lock)) When setting layout in layout lock, the lock could lost its layout bits, and we'd try fetch the layout lock again. Signed-off-by: Bobi Jam Change-Id: I10f96e4cb03cfe228d3c1ea1500b1a8d8e4e5e54 Reviewed-on: https://review.whamcloud.com/44054 Tested-by: jenkins Reviewed-by: Patrick Farrell Tested-by: Maloo Reviewed-by: Yingjin Qian Reviewed-by: Oleg Drokin --- lustre/llite/file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 6f25a6a..a96286f 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -5754,7 +5754,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, lock = ldlm_handle2lock(lockh); LASSERT(lock != NULL); - LASSERT(ldlm_has_layout(lock)); + + if (!ldlm_has_layout(lock)) + GOTO(out, rc = -EAGAIN); LDLM_DEBUG(lock, "file "DFID"(%p) being reconfigured", PFID(&lli->lli_fid), inode); -- 1.8.3.1