diff options
| author | Darrick J. Wong <djwong@kernel.org> | 2026-09-08 23:05:21 -0700 |
|---|---|---|
| committer | Carlos Maiolino <cem@kernel.org> | 2026-09-11 08:44:16 +0200 |
| commit | d3a6a35a220615c4f4578aedf3b1626b91d3acae (patch) | |
| tree | 0cee039a966cc140bb5b211a2b34c47f280f2397 | |
| parent | 3bdbf472a608aeb7e8e4dc70ee86738ad5256356 (diff) | |
| download | lwn-d3a6a35a220615c4f4578aedf3b1626b91d3acae.tar.gz lwn-d3a6a35a220615c4f4578aedf3b1626b91d3acae.zip | |
xfs: fix termination logic in xchk_bmap
xchk_should_terminate can turn its @error argument into -EINTR if the
user is sitting on ^C. Unfortunately, this code here turns that into a
0 return, which isn't quite correct. LOLLM complains about this, though
I think it's a very minor matter because the only way -EINTR happens is
if there's a fatal signal.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
| -rw-r--r-- | fs/xfs/scrub/bmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 3b0f1dbd9147..4f3c7f681bd9 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -1103,8 +1103,9 @@ xchk_bmap( * the rmap must match the combined mapping exactly. */ while (xchk_bmap_iext_iter(&info, &irec)) { - if (xchk_should_terminate(sc, &error) || - (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) + if (xchk_should_terminate(sc, &error)) + return error; + if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return 0; if (irec.br_startoff >= endoff) { |
