mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
btrfs: fallocate: use GFP_KERNEL
Fallocate is initiated from userspace and is not on the critical writeback path, we don't need to use GFP_NOFS for allocations. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
74e4d82757
commit
32fc932e30
1 changed files with 3 additions and 3 deletions
|
@ -2611,7 +2611,7 @@ static int add_falloc_range(struct list_head *head, u64 start, u64 len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
insert:
|
insert:
|
||||||
range = kmalloc(sizeof(*range), GFP_NOFS);
|
range = kmalloc(sizeof(*range), GFP_KERNEL);
|
||||||
if (!range)
|
if (!range)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
range->start = start;
|
range->start = start;
|
||||||
|
@ -2712,7 +2712,7 @@ static long btrfs_fallocate(struct file *file, int mode,
|
||||||
btrfs_put_ordered_extent(ordered);
|
btrfs_put_ordered_extent(ordered);
|
||||||
unlock_extent_cached(&BTRFS_I(inode)->io_tree,
|
unlock_extent_cached(&BTRFS_I(inode)->io_tree,
|
||||||
alloc_start, locked_end,
|
alloc_start, locked_end,
|
||||||
&cached_state, GFP_NOFS);
|
&cached_state, GFP_KERNEL);
|
||||||
/*
|
/*
|
||||||
* we can't wait on the range with the transaction
|
* we can't wait on the range with the transaction
|
||||||
* running or with the extent lock held
|
* running or with the extent lock held
|
||||||
|
@ -2806,7 +2806,7 @@ static long btrfs_fallocate(struct file *file, int mode,
|
||||||
}
|
}
|
||||||
out_unlock:
|
out_unlock:
|
||||||
unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end,
|
unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end,
|
||||||
&cached_state, GFP_NOFS);
|
&cached_state, GFP_KERNEL);
|
||||||
out:
|
out:
|
||||||
/*
|
/*
|
||||||
* As we waited the extent range, the data_rsv_map must be empty
|
* As we waited the extent range, the data_rsv_map must be empty
|
||||||
|
|
Loading…
Add table
Reference in a new issue