From: Filipe Manana Date: Thu, 6 Mar 2025 16:07:18 +0000 (+0000) Subject: btrfs: avoid unnecessary bio dereference at run_one_async_done() X-Git-Tag: v6.15-rc1~152^2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9024b744e716819b0130673b9ae242e46b00b6cb;p=thirdparty%2Fkernel%2Flinux.git btrfs: avoid unnecessary bio dereference at run_one_async_done() We have dereferenced the async_submit_bio structure and extracted the bio pointer into a local variable, so there's no need to dereference it again when calling btrfs_bio_end_io(). Just use "bio->bi_status" instead of the longer expression "async->bbio->bio.bi_status". Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c index 375cae2fbcad4..8c2eee1f18787 100644 --- a/fs/btrfs/bio.c +++ b/fs/btrfs/bio.c @@ -573,7 +573,7 @@ static void run_one_async_done(struct btrfs_work *work, bool do_free) /* If an error occurred we just want to clean up the bio and move on. */ if (bio->bi_status) { - btrfs_bio_end_io(async->bbio, async->bbio->bio.bi_status); + btrfs_bio_end_io(async->bbio, bio->bi_status); return; }