From 7eb7db614fee3877dc7d6e2e916a73eb0f7f9fe3 Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Fri, 4 Jun 2021 11:58:29 +0800 Subject: [PATCH] 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 --- 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 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); -- 1.8.3.1