diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-09-18 16:34:36 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:13:24 +0200 |
commit | be17b3afc4a6255008d4bbf7b1b45a36ac54bece (patch) | |
tree | 159c18b1ffae28f73a453254ec1251f126f3a63e | |
parent | cd0537449c275ca7da6f6e3ea2389ae5225c6b4e (diff) |
btrfs: don't opencode is_data_inode in end_bio_extent_readpage
Use the is_data_inode helper.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 1a96251ade1f..eb6094c87a55 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -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 |