summaryrefslogtreecommitdiff
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-06-29 11:56:42 +0300
committerDavid Sterba <dsterba@suse.com>2018-08-06 14:12:43 +0300
commit3ffbd68c48320730ef64ebfb5e639220f1f65483 (patch)
tree8ba0da4fa561d426c61374ab3309e68ebcdc3993 /fs/btrfs/file-item.c
parent37508515621551538addaf826ab4b8a9aaf0a382 (diff)
downloadlinux-3ffbd68c48320730ef64ebfb5e639220f1f65483.tar.xz
btrfs: simplify pointer chasing of local fs_info variables
Functions that get btrfs inode can simply reach the fs_info by dereferencing the root and this looks a bit more straightforward compared to the btrfs_sb(...) indirection. If the transaction handle is available and not NULL it's used instead. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r--fs/btrfs/file-item.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 8c3cd7072caf..ba74827beb32 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -922,7 +922,7 @@ void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode,
const bool new_inline,
struct extent_map *em)
{
- struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb);
+ struct btrfs_fs_info *fs_info = inode->root->fs_info;
struct btrfs_root *root = inode->root;
struct extent_buffer *leaf = path->nodes[0];
const int slot = path->slots[0];