btrfs: Remove unused -EIO assignment in end_bio_extent_readpage
authorNikolay Borisov <nborisov@suse.com>
Mon, 18 Mar 2019 15:45:18 +0000 (17:45 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:22 +0000 (19:02 +0200)
In case we hit the error case for a metadata buffer in
end_bio_extent_readpage then 'ret' won't really be checked before it's
written again to. This means the -EIO in this case will never be
checked, just remove it.

Fixes-coverity-id: 1442513
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index 9901e8127e0f3bece97c5701a4e1df84c8e6ac1a..d0b8ed2c2631f963789a0eea88f01c1d838b7ff1 100644 (file)
@@ -2614,8 +2614,6 @@ static void end_bio_extent_readpage(struct bio *bio)
                        if (test_and_clear_bit(EXTENT_BUFFER_READAHEAD,
                                               &eb->bflags))
                                btree_readahead_hook(eb, -EIO);
-
-                       ret = -EIO;
                }
 readpage_ok:
                if (likely(uptodate)) {