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" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
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 {