[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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Neil Brown 2005-04-16 15:23:54 -07:00 • committed by Linus Torvalds
commit baaa2c512d

View file

@ -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;