/* Sanity test specific functions */
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
void btrfs_test_destroy_inode(struct inode *inode);
-int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
- u64 rfer, u64 excl);
#endif
+ static inline int btrfs_test_is_dummy_root(struct btrfs_root *root)
+ {
+ #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+ if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
+ return 1;
+ #endif
+ return 0;
+ }
+
#endif
}
if (unlikely(ret)) {
- for (; i < num_pages; i++)
- unlock_page(eb->pages[i]);
+ for (; i < num_pages; i++) {
- struct page *p = extent_buffer_page(eb, i);
++ struct page *p = eb->pages[i];
+ clear_page_dirty_for_io(p);
+ unlock_page(p);
+ }
}
return ret;