提交 43e817a1 编写于 作者: I Itaru Kitayama 提交者: Chris Mason

btrfs: fix wrong allocating flag when reading page

the space cache use extent_readpages() to read free space information,
so we can not use GFP_KERNEL flag to allocate memory, or it may lead
to deadlock.
Signed-off-by: NItaru Kitayama <kitayama@cl.bb4u.ne.jp>
Signed-off-by: NMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 a62f44a5
...@@ -2681,7 +2681,7 @@ int extent_readpages(struct extent_io_tree *tree, ...@@ -2681,7 +2681,7 @@ int extent_readpages(struct extent_io_tree *tree,
prefetchw(&page->flags); prefetchw(&page->flags);
list_del(&page->lru); list_del(&page->lru);
if (!add_to_page_cache_lru(page, mapping, if (!add_to_page_cache_lru(page, mapping,
page->index, GFP_KERNEL)) { page->index, GFP_NOFS)) {
__extent_read_full_page(tree, page, get_extent, __extent_read_full_page(tree, page, get_extent,
&bio, 0, &bio_flags); &bio, 0, &bio_flags);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册