From: Itaru Kitayama Date: Mon, 25 Apr 2011 23:43:51 +0000 (-0400) Subject: btrfs: fix wrong allocating flag when reading page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=43e817a1fdda17f3357602ed7964c248c8c53ae0;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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: Itaru Kitayama Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 5ae0bffaa4d..0d1196d6f78 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2681,7 +2681,7 @@ int extent_readpages(struct extent_io_tree *tree, prefetchw(&page->flags); list_del(&page->lru); if (!add_to_page_cache_lru(page, mapping, - page->index, GFP_KERNEL)) { + page->index, GFP_NOFS)) { __extent_read_full_page(tree, page, get_extent, &bio, 0, &bio_flags); }