From: Darrick J. Wong Date: Thu, 4 Jun 2026 06:08:14 +0000 (-0700) Subject: xfs_scrub: don't return garbage value from bulkstat_the_rest X-Git-Tag: v7.1.0~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc4e11fa3d7cc2dfcf5fb526e16e6d54e4cf40b1;p=xfsprogs-dev.git xfs_scrub: don't return garbage value from bulkstat_the_rest bulkstat_the_rest returns an inode mask, but Codex noticed that we carelessly return an error number if we can't allocate a bulkstat request. Fix this by returning 0, which forces the caller to singlestep the rest of the bulkstat array. Cc: linux-xfs@vger.kernel.org # v6.14.0 Fixes: 7ae92e1cb0aeeb ("xfs_scrub: try harder to fill the bulkstat array with bulkstat()") Signed-off-by: "Darrick J. Wong" Reviewed-by: Andrey Albershteyn --- diff --git a/scrub/inodes.c b/scrub/inodes.c index bfd4abc4..ab5cf393 100644 --- a/scrub/inodes.c +++ b/scrub/inodes.c @@ -152,8 +152,13 @@ bulkstat_the_rest( error = -xfrog_bulkstat_alloc_req( orig_breq->hdr.icount - orig_breq->hdr.ocount, start_ino, &new_breq); - if (error) - return error; + if (error) { + /* + * Couldn't allocate memory for bulkstat, so we return 0 and + * let the caller single-step. + */ + return 0; + } new_breq->hdr.flags = orig_breq->hdr.flags; do {