Btrfs: add sanity tests for new qgroup accounting code
[linux-2.6-block.git] / fs / btrfs / backref.c
index 10db21fa09263786db6d094c64ee7b16a1c2c2ae..f09aa18ab7101499d6a3cee7b234be6d74072a19 100644 (file)
@@ -900,7 +900,11 @@ again:
                goto out;
        BUG_ON(ret == 0);
 
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+       if (trans && likely(trans->type != __TRANS_DUMMY)) {
+#else
        if (trans) {
+#endif
                /*
                 * look if there are updates for this ref queued and lock the
                 * head