summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-08-31 14:42:42 +0300
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:12:18 +0200
commit6fee248d2beb3591f6f50aeeac843b366b116e3b (patch)
treed16f8b583477b9f5dd8c270b18bfc9b6cbd1ab9a /fs/btrfs/extent_io.c
parent90c0304c6307a68e1e4af637d56d6613ed026875 (diff)
downloadlinux-6fee248d2beb3591f6f50aeeac843b366b116e3b.tar.bz2
btrfs: convert btrfs_inode_sectorsize to take btrfs_inode
It's counterintuitive to have a function named btrfs_inode_xxx which takes a generic inode. Also move the function to btrfs_inode.h so that it has access to the definition of struct btrfs_inode. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f971e9d689df..94ec2455de99 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4555,7 +4555,7 @@ next:
static struct extent_map *get_extent_skip_holes(struct inode *inode,
u64 offset, u64 last)
{
- u64 sectorsize = btrfs_inode_sectorsize(inode);
+ u64 sectorsize = btrfs_inode_sectorsize(BTRFS_I(inode));
struct extent_map *em;
u64 len;
@@ -4736,8 +4736,8 @@ int extent_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
goto out_free_ulist;
}
- start = round_down(start, btrfs_inode_sectorsize(inode));
- len = round_up(max, btrfs_inode_sectorsize(inode)) - start;
+ start = round_down(start, btrfs_inode_sectorsize(BTRFS_I(inode)));
+ len = round_up(max, btrfs_inode_sectorsize(BTRFS_I(inode))) - start;
/*
* lookup the last file extent. We're not using i_size here