aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-10-31 16:30:47 +0100
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:12 +0100
commit66b0c887bbf61555fde648587644485388dddb78 (patch)
treea38a54f5bde3e2a21d91a4f84c81a2c97209b3d5 /fs/btrfs/extent_io.h
parentbtrfs: use non-RCU list traversal in write_all_supers callees (diff)
downloadlinux-dev-66b0c887bbf61555fde648587644485388dddb78.tar.xz
linux-dev-66b0c887bbf61555fde648587644485388dddb78.zip
btrfs: prepare to drop gfp mask parameter from clear_extent_bit
Use __clear_extent_bit directly in case we want to pass unknown gfp flags. Otherwise all clear_extent_bit callers use GFP_NOFS, so we can sink them to the function and reduce argument count, at the cost that __clear_extent_bit has to be exported. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r--fs/btrfs/extent_io.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 93dcae0c3183..2cdfc64a1356 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -301,6 +301,10 @@ int clear_record_extent_bits(struct extent_io_tree *tree, u64 start, u64 end,
int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
unsigned bits, int wake, int delete,
struct extent_state **cached, gfp_t mask);
+int __clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
+ unsigned bits, int wake, int delete,
+ struct extent_state **cached, gfp_t mask,
+ struct extent_changeset *changeset);
static inline int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end)
{
@@ -311,8 +315,8 @@ static inline int unlock_extent(struct extent_io_tree *tree, u64 start, u64 end)
static inline int unlock_extent_cached(struct extent_io_tree *tree, u64 start,
u64 end, struct extent_state **cached, gfp_t mask)
{
- return clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, cached,
- mask);
+ return __clear_extent_bit(tree, start, end, EXTENT_LOCKED, 1, 0, cached,
+ mask, NULL);
}
static inline int clear_extent_bits(struct extent_io_tree *tree, u64 start,
@@ -342,8 +346,8 @@ static inline int set_extent_bits(struct extent_io_tree *tree, u64 start,
static inline int clear_extent_uptodate(struct extent_io_tree *tree, u64 start,
u64 end, struct extent_state **cached_state, gfp_t mask)
{
- return clear_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, 0,
- cached_state, mask);
+ return __clear_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, 0,
+ cached_state, mask, NULL);
}
static inline int set_extent_dirty(struct extent_io_tree *tree, u64 start,