From e2663443da71445a0c847199480b6a53ddec35e5 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 12 Nov 2025 13:14:25 +0100 Subject: [PATCH] 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 Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- fs/xfs/xfs_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 2c1371f6f5e33..6d0319388e29f 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); -- 2.47.3