From: Bobi Jam Date: Fri, 4 Jun 2021 03:58:29 +0000 (+0800) Subject: LU-14780 llite: failed ASSERTION(ldlm_has_layout(lock)) X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fheads%2Fb2_12-next;p=fs%2Flustre-release.git 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. Lustre-change: https://review.whamcloud.com/44054 Lustre-commit: 1b166d6dd6a2f39dfe35b60be169b288665d0283 Signed-off-by: Bobi Jam Change-Id: I10f96e4cb03cfe228d3c1ea1500b1a8d8e4e5e54 Reviewed-by: Patrick Farrell Reviewed-by: Yingjin Qian Signed-off-by: Minh Diep --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index f382e07..340f88b 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -5022,7 +5022,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);