Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: remove no longer used counter when reading data page

After commit 92082d40976ed0 ("btrfs: integrate page status update for
data read path into begin/end_page_read"), the 'nr' counter at
btrfs_do_readpage() is no longer used, we increment it but we never
read from it. So just remove it.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Filipe Manana and committed by
David Sterba
ad3fc794 bbf0ea7e

+1 -4
+1 -4
fs/btrfs/extent_io.c
··· 3563 3563 u64 cur_end; 3564 3564 struct extent_map *em; 3565 3565 int ret = 0; 3566 - int nr = 0; 3567 3566 size_t pg_offset = 0; 3568 3567 size_t iosize; 3569 3568 size_t blocksize = inode->i_sb->s_blocksize; ··· 3721 3722 end_bio_extent_readpage, 0, 3722 3723 this_bio_flag, 3723 3724 force_bio_submit); 3724 - if (!ret) { 3725 - nr++; 3726 - } else { 3725 + if (ret) { 3727 3726 unlock_extent(tree, cur, cur + iosize - 1); 3728 3727 end_page_read(page, false, cur, iosize); 3729 3728 goto out;