Merge tag 'samsung-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
[cascardo/linux.git] / fs / btrfs / tree-defrag.c
index 76928ca..a63719c 100644 (file)
@@ -49,7 +49,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
                goto out;
        }
 
-       if (root->ref_cows == 0)
+       if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state))
                goto out;
 
        if (btrfs_test_opt(root, SSD))