]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
dm-verity: remove unnecessary condition for verity_fec_finish_io()
authorEric Biggers <ebiggers@kernel.org>
Fri, 19 Dec 2025 19:29:05 +0000 (11:29 -0800)
committerMikulas Patocka <mpatocka@redhat.com>
Sun, 4 Jan 2026 19:35:32 +0000 (20:35 +0100)
Make verity_finish_io() call verity_fec_finish_io() unconditionally,
instead of skipping it when 'in_bh' is true.

Although FEC can't have been done when 'in_bh' is true,
verity_fec_finish_io() is a no-op when FEC wasn't done.  An earlier
change also made verity_fec_finish_io() very lightweight when FEC wasn't
done.  So it should just be called unconditionally.

Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-verity-target.c

index 5c17472d7896666fa8ee5cec12574b93aba24061..c9f5602a42c69b0ec63715fb20642e6d8299c84d 100644 (file)
@@ -619,8 +619,7 @@ static void verity_finish_io(struct dm_verity_io *io, blk_status_t status)
        bio->bi_end_io = io->orig_bi_end_io;
        bio->bi_status = status;
 
-       if (!static_branch_unlikely(&use_bh_wq_enabled) || !io->in_bh)
-               verity_fec_finish_io(io);
+       verity_fec_finish_io(io);
 
        if (unlikely(status != BLK_STS_OK) &&
            unlikely(!(bio->bi_opf & REQ_RAHEAD)) &&