btrfs: move checks for DUMMY_ROOT into a helper
Signed-off-by: David Sterba <dsterba@suse.cz>
Šī revīzija ir iekļauta:
@@ -539,10 +539,9 @@ static int add_qgroup_item(struct btrfs_trans_handle *trans,
|
||||
struct extent_buffer *leaf;
|
||||
struct btrfs_key key;
|
||||
|
||||
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
||||
if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, "a_root->state)))
|
||||
if (btrfs_test_is_dummy_root(quota_root))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
path = btrfs_alloc_path();
|
||||
if (!path)
|
||||
return -ENOMEM;
|
||||
@@ -698,10 +697,9 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans,
|
||||
int ret;
|
||||
int slot;
|
||||
|
||||
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
||||
if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
|
||||
if (btrfs_test_is_dummy_root(root))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
key.objectid = 0;
|
||||
key.type = BTRFS_QGROUP_INFO_KEY;
|
||||
key.offset = qgroup->qgroupid;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user