diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-02-20 06:51:06 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 05:30:11 -0500 |
commit | fc4f21b1d8d023cf0a2b1b050ae18e15dbe7068e (patch) | |
tree | c60e46d29ce3e39fdd8a71f0a8b306b87f61e9ee /fs/btrfs/file.c | |
parent | 1c8c9c5216295711c79d0e512dc8b3d5f1bfc35d (diff) |
btrfs: Make get_extent_t take btrfs_inode
In addition to changing the signature, this patch also switches
all the functions which are used as an argument to also take btrfs_inode.
Namely those are: btrfs_get_extent and btrfs_get_extent_filemap.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index dff7ec1770c1..48dfb8e4baf2 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -2341,7 +2341,7 @@ static int find_first_non_hole(struct inode *inode, u64 *start, u64 *len) | |||
2341 | struct extent_map *em; | 2341 | struct extent_map *em; |
2342 | int ret = 0; | 2342 | int ret = 0; |
2343 | 2343 | ||
2344 | em = btrfs_get_extent(inode, NULL, 0, *start, *len, 0); | 2344 | em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, *start, *len, 0); |
2345 | if (IS_ERR_OR_NULL(em)) { | 2345 | if (IS_ERR_OR_NULL(em)) { |
2346 | if (!em) | 2346 | if (!em) |
2347 | ret = -ENOMEM; | 2347 | ret = -ENOMEM; |
@@ -2833,7 +2833,7 @@ static long btrfs_fallocate(struct file *file, int mode, | |||
2833 | /* First, check if we exceed the qgroup limit */ | 2833 | /* First, check if we exceed the qgroup limit */ |
2834 | INIT_LIST_HEAD(&reserve_list); | 2834 | INIT_LIST_HEAD(&reserve_list); |
2835 | while (1) { | 2835 | while (1) { |
2836 | em = btrfs_get_extent(inode, NULL, 0, cur_offset, | 2836 | em = btrfs_get_extent(BTRFS_I(inode), NULL, 0, cur_offset, |
2837 | alloc_end - cur_offset, 0); | 2837 | alloc_end - cur_offset, 0); |
2838 | if (IS_ERR_OR_NULL(em)) { | 2838 | if (IS_ERR_OR_NULL(em)) { |
2839 | if (!em) | 2839 | if (!em) |
@@ -2960,7 +2960,8 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int whence) | |||
2960 | &cached_state); | 2960 | &cached_state); |
2961 | 2961 | ||
2962 | while (start < inode->i_size) { | 2962 | while (start < inode->i_size) { |
2963 | em = btrfs_get_extent_fiemap(inode, NULL, 0, start, len, 0); | 2963 | em = btrfs_get_extent_fiemap(BTRFS_I(inode), NULL, 0, |
2964 | start, len, 0); | ||
2964 | if (IS_ERR(em)) { | 2965 | if (IS_ERR(em)) { |
2965 | ret = PTR_ERR(em); | 2966 | ret = PTR_ERR(em); |
2966 | em = NULL; | 2967 | em = NULL; |