btrfs: btrfs_test_opt and friends should take a btrfs_fs_info
btrfs_test_opt and friends only use the root pointer to access the fs_info. Let's pass the fs_info directly in preparation to eliminate similar patterns all over btrfs. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:

committed by
David Sterba

parent
bc074524e1
commit
3cdde2240d
@@ -132,7 +132,7 @@ static int __btrfs_add_inode_defrag(struct inode *inode,
|
||||
|
||||
static inline int __need_auto_defrag(struct btrfs_root *root)
|
||||
{
|
||||
if (!btrfs_test_opt(root, AUTO_DEFRAG))
|
||||
if (!btrfs_test_opt(root->fs_info, AUTO_DEFRAG))
|
||||
return 0;
|
||||
|
||||
if (btrfs_fs_closing(root->fs_info))
|
||||
|
Reference in New Issue
Block a user