]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: remove dead assignment in prepare_one_folio()
authorMassimiliano Pellizzer <mpellizzer.dev@gmail.com>
Thu, 4 Dec 2025 21:09:59 +0000 (22:09 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 05:38:33 +0000 (06:38 +0100)
commitd7a5d511c098ed3e67912272c938627f04a1a9ad
tree9aaac1785b4e58d22f41506623a3e0b165506758
parente6698b34fab33867ef3faeeea6feb165f31aae24
btrfs: remove dead assignment in prepare_one_folio()

In prepare_one_folio(), ret is initialized to 0 at declaration,
and in an error path we assign ret = 0 before jumping to the
again label to retry the operation. However, ret is immediately
overwritten by ret = set_folio_extent_mapped(folio) after the
again label.

Both assignments are never observed by any code path,
therefore they can be safely removed.

Signed-off-by: Massimiliano Pellizzer <mpellizzer.dev@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c