mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: open code set_extent_bits_nowait
The helper only passes GFP_NOWAIT as gfp flags and is used two times. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
fe1a598c42
commit
e85de967bc
3 changed files with 5 additions and 10 deletions
|
@ -156,12 +156,6 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
|
||||||
int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
|
int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
|
||||||
u32 bits, struct extent_state **cached_state, gfp_t mask);
|
u32 bits, struct extent_state **cached_state, gfp_t mask);
|
||||||
|
|
||||||
static inline int set_extent_bits_nowait(struct extent_io_tree *tree, u64 start,
|
|
||||||
u64 end, u32 bits)
|
|
||||||
{
|
|
||||||
return set_extent_bit(tree, start, end, bits, NULL, GFP_NOWAIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int set_extent_bits(struct extent_io_tree *tree, u64 start,
|
static inline int set_extent_bits(struct extent_io_tree *tree, u64 start,
|
||||||
u64 end, u32 bits)
|
u64 end, u32 bits)
|
||||||
{
|
{
|
||||||
|
|
|
@ -364,8 +364,9 @@ static void extent_map_device_set_bits(struct extent_map *em, unsigned bits)
|
||||||
struct btrfs_io_stripe *stripe = &map->stripes[i];
|
struct btrfs_io_stripe *stripe = &map->stripes[i];
|
||||||
struct btrfs_device *device = stripe->dev;
|
struct btrfs_device *device = stripe->dev;
|
||||||
|
|
||||||
set_extent_bits_nowait(&device->alloc_state, stripe->physical,
|
set_extent_bit(&device->alloc_state, stripe->physical,
|
||||||
stripe->physical + stripe_size - 1, bits);
|
stripe->physical + stripe_size - 1, bits, NULL,
|
||||||
|
GFP_NOWAIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1611,8 +1611,8 @@ void btrfs_redirty_list_add(struct btrfs_transaction *trans,
|
||||||
memzero_extent_buffer(eb, 0, eb->len);
|
memzero_extent_buffer(eb, 0, eb->len);
|
||||||
set_bit(EXTENT_BUFFER_NO_CHECK, &eb->bflags);
|
set_bit(EXTENT_BUFFER_NO_CHECK, &eb->bflags);
|
||||||
set_extent_buffer_dirty(eb);
|
set_extent_buffer_dirty(eb);
|
||||||
set_extent_bits_nowait(&trans->dirty_pages, eb->start,
|
set_extent_bit(&trans->dirty_pages, eb->start, eb->start + eb->len - 1,
|
||||||
eb->start + eb->len - 1, EXTENT_DIRTY);
|
EXTENT_DIRTY, NULL, GFP_NOWAIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool btrfs_use_zone_append(struct btrfs_bio *bbio)
|
bool btrfs_use_zone_append(struct btrfs_bio *bbio)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue