[lustre-devel] [PATCH 16/18] lustre: llite: failed ASSERTION(ldlm_has_layout(lock))
James Simmons
jsimmons at infradead.org
Mon Jul 19 05:32:11 PDT 2021
From: Bobi Jam <bobijam at whamcloud.com>
When setting layout in layout lock, the lock could lost its layout
bits, and we'd try fetch the layout lock again.
WC-bug-id: https://jira.whamcloud.com/browse/LU-14780
Lustre-commit: 1b166d6dd6a2f39d ("LU-14780 llite: failed ASSERTION(ldlm_has_layout(lock))")
Signed-off-by: Bobi Jam <bobijam at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44054
Reviewed-by: Patrick Farrell <pfarrell at whamcloud.com>
Reviewed-by: Yingjin Qian <qian at ddn.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/llite/file.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c
index 1ef5fd8..b822ca5 100644
--- a/fs/lustre/llite/file.c
+++ b/fs/lustre/llite/file.c
@@ -5609,7 +5609,11 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
lock = ldlm_handle2lock(lockh);
LASSERT(lock);
- LASSERT(ldlm_has_layout(lock));
+
+ if (!ldlm_has_layout(lock)) {
+ rc = -EAGAIN;
+ goto out;
+ }
LDLM_DEBUG(lock, "File " DFID "(%p) being reconfigured",
PFID(&lli->lli_fid), inode);
--
1.8.3.1
More information about the lustre-devel
mailing list