summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2025-11-12 13:14:25 +0100
committerCarlos Maiolino <cem@kernel.org>2026-01-21 12:57:16 +0100
commite2663443da71445a0c847199480b6a53ddec35e5 (patch)
treefb7e88f6c147449ea31b9a35d481193a667e83b2
parent865970d49a45af00ac4576684c33024e8d59b84c (diff)
xfs: improve the iclog space assert in xlog_write_iovec
We need enough space for the length we copy into the iclog, not just some space, so tighten up the check a bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r--fs/xfs/xfs_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 2c1371f6f5e3..6d0319388e29 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1891,7 +1891,7 @@ xlog_write_iovec(
void *buf,
uint32_t buf_len)
{
- ASSERT(xlog_write_space_left(data) > 0);
+ ASSERT(xlog_write_space_left(data) >= buf_len);
ASSERT(data->log_offset % sizeof(int32_t) == 0);
ASSERT(buf_len % sizeof(int32_t) == 0);