diff options
author | David Sterba <dsterba@suse.com> | 2015-12-03 14:41:30 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-12-03 14:44:59 +0100 |
commit | cd716d8fea125e5531003e66aaf7ca7323277f83 (patch) | |
tree | 875514d4271f083a7a43c197093db311cfe0be9f /fs | |
parent | btrfs: drop unused parameter from lock_extent_bits (diff) | |
download | linux-cd716d8fea125e5531003e66aaf7ca7323277f83.tar.xz linux-cd716d8fea125e5531003e66aaf7ca7323277f83.zip |
btrfs: make lock_extent static inline
One call less reduces stack usage, code slightly reduced as well.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent_io.c | 5 | ||||
-rw-r--r-- | fs/btrfs/extent_io.h | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index bf9849909d46..044ffa3a520a 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1347,11 +1347,6 @@ int lock_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, return err; } -int lock_extent(struct extent_io_tree *tree, u64 start, u64 end) -{ - return lock_extent_bits(tree, start, end, NULL); -} - int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end) { int err; diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index e5726a3f9ce5..7cb9fa5845dc 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -199,9 +199,14 @@ int try_release_extent_mapping(struct extent_map_tree *map, struct extent_io_tree *tree, struct page *page, gfp_t mask); int try_release_extent_buffer(struct page *page); -int lock_extent(struct extent_io_tree *tree, u64 start, u64 end); int lock_extent_bits(struct extent_io_tree *tree, u64 start, u64 end, struct extent_state **cached); + +static inline int lock_extent(struct extent_io_tree *tree, u64 start, u64 end) +{ + return lock_extent_bits(tree, start, end, NULL); +} + int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end); int extent_read_full_page(struct extent_io_tree *tree, struct page *page, get_extent_t *get_extent, int mirror_num); |