diff mbox

Btrfs: fix qgroup sanity tests

Message ID 20151007084556.GB7734@twin.jikos.cz (mailing list archive)
State Accepted
Headers show

Commit Message

David Sterba Oct. 7, 2015, 8:45 a.m. UTC
On Mon, Oct 05, 2015 at 11:03:08AM -0400, Josef Bacik wrote:
> +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
> +	if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state))) {
> +		srcu_read_unlock(&fs_info->subvol_srcu, index);
> +		ret = -ENOENT;
> +		goto out;
> +	}
> +#endif

The inline ifdefs are not necessary, please use the helper


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -362,13 +362,12 @@  static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
                goto out;
        }

-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
-       if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state))) {
+       if (btrfs_test_is_dummy_root(root)) {
                srcu_read_unlock(&fs_info->subvol_srcu, index);
                ret = -ENOENT;
                goto out;
        }
-#endif
+
        if (path->search_commit_root)
                root_level = btrfs_header_level(root->commit_root);
        else if (time_seq == (u64)-1)