Commit be17b3af authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: don't opencode is_data_inode in end_bio_extent_readpage

Use the is_data_inode helper.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent cd053744
......@@ -2816,8 +2816,6 @@ static void end_bio_extent_readpage(struct bio *bio)
struct page *page = bvec->bv_page;
struct inode *inode = page->mapping->host;
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
bool data_inode = btrfs_ino(BTRFS_I(inode))
!= BTRFS_BTREE_INODE_OBJECTID;
btrfs_debug(fs_info,
"end_bio_extent_readpage: bi_sector=%llu, err=%d, mirror=%u",
......@@ -2848,7 +2846,7 @@ static void end_bio_extent_readpage(struct bio *bio)
mirror = io_bio->mirror_num;
if (likely(uptodate)) {
if (data_inode)
if (is_data_inode(inode))
ret = btrfs_verify_data_csum(io_bio, offset, page,
start, end, mirror);
else
......@@ -2866,7 +2864,7 @@ static void end_bio_extent_readpage(struct bio *bio)
if (likely(uptodate))
goto readpage_ok;
if (data_inode) {
if (is_data_inode(inode)) {
/*
* The generic bio_readpage_error handles errors the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment