From: Johannes Weiner Date: Fri, 2 Dec 2011 03:12:06 +0000 (+1100) Subject: Btrfs: pass __GFP_WRITE for buffered write page allocations X-Git-Tag: next-20111202~2^2~133 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0d9a11685c4a1adb2460dd1c48b815b3f28a7604;p=karo-tx-linux.git Btrfs: pass __GFP_WRITE for buffered write page allocations Tell the page allocator that pages allocated for a buffered write are expected to become dirty soon. Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel Acked-by: Mel Gorman Cc: Minchan Kim Cc: Michal Hocko Cc: KAMEZAWA Hiroyuki Cc: Christoph Hellwig Cc: Wu Fengguang Cc: Dave Chinner Cc: Jan Kara Cc: Shaohua Li Cc: Chris Mason Signed-off-by: Andrew Morton --- diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 5da5b669e5de..fcf43b418502 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1081,7 +1081,7 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file, again: for (i = 0; i < num_pages; i++) { pages[i] = find_or_create_page(inode->i_mapping, index + i, - mask); + mask | __GFP_WRITE); if (!pages[i]) { faili = i - 1; err = -ENOMEM;