]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove duplicated eb uptodate check in btrfs_buffer_uptodate()
authorFilipe Manana <fdmanana@suse.com>
Mon, 9 Feb 2026 10:03:08 +0000 (10:03 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 Apr 2026 16:55:55 +0000 (18:55 +0200)
We are calling extent_buffer_uptodate() twice, and the result will not
change before the second call. So remove the second call.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c

index 9f4f770c7da61387acbb601700e34d2319d0b8db..200a165f9a84075168cba7c470a1cb10520b75b1 100644 (file)
@@ -121,8 +121,7 @@ int btrfs_buffer_uptodate(struct extent_buffer *eb, u64 parent_transid, bool ato
        if (atomic)
                return -EAGAIN;
 
-       if (!extent_buffer_uptodate(eb) ||
-           btrfs_header_generation(eb) != parent_transid) {
+       if (btrfs_header_generation(eb) != parent_transid) {
                btrfs_err_rl(eb->fs_info,
 "parent transid verify failed on logical %llu mirror %u wanted %llu found %llu",
                        eb->start, eb->read_mirror,