diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-03-27 15:24:10 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 20:02:36 +0300 |
commit | 4ca7365606ca08282da248fbc270abf58a515e20 (patch) | |
tree | 44613d3e93ccd30f9728764f5786ba4ac948c10a /fs/btrfs/extent_io.c | |
parent | 930b09072977583226a05b4f2e1db259f9a2417b (diff) | |
download | linux-4ca7365606ca08282da248fbc270abf58a515e20.tar.xz |
btrfs: Implement set_extent_bits_nowait
It will be used in a future patch that will require modifying an
extent_io_tree struct under a spinlock.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 26d7b6a5d567..ff1f7b4ac02c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1368,6 +1368,13 @@ int set_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, changeset); } +int set_extent_bits_nowait(struct extent_io_tree *tree, u64 start, u64 end, + unsigned bits) +{ + return __set_extent_bit(tree, start, end, bits, 0, NULL, NULL, + GFP_NOWAIT, NULL); +} + int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, unsigned bits, int wake, int delete, struct extent_state **cached) |