eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS);
found_start = btrfs_header_bytenr(eb);
- if (found_start != start) {
+ if (0 && found_start != start) {
printk("bad tree block start %llu %llu\n",
(unsigned long long)found_start,
(unsigned long long)eb->start);
struct extent_map_tree *map;
int ret;
+ if (PageWriteback(page) || PageDirty(page))
+ return 0;
+
tree = &BTRFS_I(page->mapping->host)->io_tree;
map = &BTRFS_I(page->mapping->host)->extent_tree;
static int btrfs_releasepage(struct page *page, gfp_t gfp_flags)
{
+ if (PageWriteback(page) || PageDirty(page))
+ return 0;
return __btrfs_releasepage(page, gfp_flags);
}