btrfs: remove do_list variable at btrfs_set_delalloc_extent()
The "do_list" variable is only used once, plus its name/meaning is a bit confusing, so remove it and directory use btrfs_is_free_space_inode(). Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d23626d8bc
commit
99c15fec32
@ -2462,7 +2462,6 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s
|
||||
u64 len = state->end + 1 - state->start;
|
||||
u64 prev_delalloc_bytes;
|
||||
u32 num_extents = count_max_extents(fs_info, len);
|
||||
bool do_list = !btrfs_is_free_space_inode(inode);
|
||||
|
||||
spin_lock(&inode->lock);
|
||||
btrfs_mod_outstanding_extents(inode, num_extents);
|
||||
@ -2487,7 +2486,7 @@ void btrfs_set_delalloc_extent(struct btrfs_inode *inode, struct extent_state *s
|
||||
* and are therefore protected against concurrent calls of this
|
||||
* function and btrfs_clear_delalloc_extent().
|
||||
*/
|
||||
if (do_list && prev_delalloc_bytes == 0)
|
||||
if (!btrfs_is_free_space_inode(inode) && prev_delalloc_bytes == 0)
|
||||
btrfs_add_delalloc_inode(inode);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user