提交 3dd39914 编写于 作者: C Chris Mason

Btrfs: Add extra checks to avoid removing extent_state from pages we can't free

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 f2984462
......@@ -436,6 +436,12 @@ static int btree_releasepage(struct page *page, gfp_t gfp_flags)
struct extent_map_tree *map;
int ret;
if (page_count(page) > 3) {
/* once for page->private, once for the caller, once
* once for the page cache
*/
return 0;
}
tree = &BTRFS_I(page->mapping->host)->io_tree;
map = &BTRFS_I(page->mapping->host)->extent_tree;
ret = try_release_extent_mapping(map, tree, page, gfp_flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册