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
@@ -142,7 +142,7 @@ no_valid_dev_replace_entry_found:
|
||||
* missing
|
||||
*/
|
||||
if (!dev_replace->srcdev &&
|
||||
!btrfs_test_opt(dev_root, DEGRADED)) {
|
||||
!btrfs_test_opt(dev_root->fs_info, DEGRADED)) {
|
||||
ret = -EIO;
|
||||
btrfs_warn(fs_info,
|
||||
"cannot mount because device replace operation is ongoing and");
|
||||
@@ -151,7 +151,7 @@ no_valid_dev_replace_entry_found:
|
||||
src_devid);
|
||||
}
|
||||
if (!dev_replace->tgtdev &&
|
||||
!btrfs_test_opt(dev_root, DEGRADED)) {
|
||||
!btrfs_test_opt(dev_root->fs_info, DEGRADED)) {
|
||||
ret = -EIO;
|
||||
btrfs_warn(fs_info,
|
||||
"cannot mount because device replace operation is ongoing and");
|
||||
|
||||
Reference in New Issue
Block a user