From: Neil Brown Date: Sat, 16 Apr 2005 22:23:54 +0000 (-0700) Subject: [PATCH] Avoid deadlock in sync_page_io by using GFP_NOIO X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=baaa2c512dc1c47e3afeb9d558c5323c9240bd21;p=openwrt%2Fstaging%2Fblogic.git [PATCH] Avoid deadlock in sync_page_io by using GFP_NOIO ..as sync_page_io can be called on the write-out path. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 04562add1920..aa72c88a024f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -332,7 +332,7 @@ static int bi_complete(struct bio *bio, unsigned int bytes_done, int error) static int sync_page_io(struct block_device *bdev, sector_t sector, int size, struct page *page, int rw) { - struct bio *bio = bio_alloc(GFP_KERNEL, 1); + struct bio *bio = bio_alloc(GFP_NOIO, 1); struct completion event; int ret;