btrfs: open code extent_set_compress_type helpers
The helpers extent_set_compress_type and extent_compress_type have become trivial after previous cleanups and can be removed. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2a5232a8ce
commit
7f6ca7f21d
|
@ -2562,7 +2562,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode
|
||||||
logical = em->block_start + logical;
|
logical = em->block_start + logical;
|
||||||
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
|
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
|
||||||
logical = em->block_start;
|
logical = em->block_start;
|
||||||
extent_set_compress_type(&failrec->bio_flags, em->compress_type);
|
failrec->bio_flags = em->compress_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
btrfs_debug(fs_info,
|
btrfs_debug(fs_info,
|
||||||
|
@ -3681,10 +3681,8 @@ static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
|
||||||
BUG_ON(extent_map_end(em) <= cur);
|
BUG_ON(extent_map_end(em) <= cur);
|
||||||
BUG_ON(end < cur);
|
BUG_ON(end < cur);
|
||||||
|
|
||||||
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
|
if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags))
|
||||||
extent_set_compress_type(&this_bio_flag,
|
this_bio_flag = em->compress_type;
|
||||||
em->compress_type);
|
|
||||||
}
|
|
||||||
|
|
||||||
iosize = min(extent_map_end(em) - cur, end - cur + 1);
|
iosize = min(extent_map_end(em) - cur, end - cur + 1);
|
||||||
cur_end = min(extent_map_end(em) - 1, end);
|
cur_end = min(extent_map_end(em) - 1, end);
|
||||||
|
|
|
@ -140,17 +140,6 @@ static inline void extent_changeset_free(struct extent_changeset *changeset)
|
||||||
kfree(changeset);
|
kfree(changeset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void extent_set_compress_type(unsigned long *bio_flags,
|
|
||||||
int compress_type)
|
|
||||||
{
|
|
||||||
*bio_flags = compress_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int extent_compress_type(unsigned long bio_flags)
|
|
||||||
{
|
|
||||||
return bio_flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct extent_map_tree;
|
struct extent_map_tree;
|
||||||
|
|
||||||
typedef struct extent_map *(get_extent_t)(struct btrfs_inode *inode,
|
typedef struct extent_map *(get_extent_t)(struct btrfs_inode *inode,
|
||||||
|
|
Loading…
Reference in New Issue