]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ext4: don't build the fsverity work handler for !CONFIG_FS_VERITY
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Jan 2026 15:26:15 +0000 (16:26 +0100)
committerEric Biggers <ebiggers@kernel.org>
Thu, 29 Jan 2026 17:39:41 +0000 (09:39 -0800)
Use IS_ENABLED to disable this code, leading to a slight size reduction:

   text    data     bss     dec     hex filename
   4121     376      16    4513    11a1 fs/ext4/readpage.o.old
   4030     328      16    4374    1116 fs/ext4/readpage.o

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Link: https://lore.kernel.org/r/20260128152630.627409-4-hch@lst.de
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
fs/ext4/readpage.c

index e7f2350c725beb024fc3e22ac974074937b0f1dd..267594ef0b2cac519270eb017b03b843a28bc6cb 100644 (file)
@@ -130,7 +130,8 @@ static void bio_post_read_processing(struct bio_post_read_ctx *ctx)
                ctx->cur_step++;
                fallthrough;
        case STEP_VERITY:
-               if (ctx->enabled_steps & (1 << STEP_VERITY)) {
+               if (IS_ENABLED(CONFIG_FS_VERITY) &&
+                   ctx->enabled_steps & (1 << STEP_VERITY)) {
                        INIT_WORK(&ctx->work, verity_work);
                        fsverity_enqueue_verify_work(&ctx->work);
                        return;