diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 69ea09659d475f6eb84df4444b0bcffc884d7d9a..af2d9a9300a729b837cc9055fe1098d9ecfa0c96 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2174,11 +2174,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, pg_offset = i_size & (PAGE_CACHE_SIZE - 1); if (page->index > end_index || (page->index == end_index && !pg_offset)) { - if (epd->extent_locked) { - if (tree->ops && tree->ops->writepage_end_io_hook) - tree->ops->writepage_end_io_hook(page, start, - page_end, NULL, 1); - } + page->mapping->a_ops->invalidatepage(page, 0); unlock_page(page); return 0; } diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index f4d3fa71bc419c3c5ef569eda6ded776ba3e605e..f7637883140716e2eef0711c2ac8f3496575cbd9 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -185,6 +185,7 @@ int btrfs_lookup_bio_sums(struct btrfs_root *root, struct inode *inode, "%llu\n", inode->i_ino, (unsigned long long)offset); item = NULL; + btrfs_release_path(root, path); goto found; } btrfs_item_key_to_cpu(path->nodes[0], &found_key,