From 652e4d2aac34225bdbce7e0a10f3438a7275e7f7 Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Thu, 16 Dec 2010 22:58:21 +0100 Subject: [PATCH 08/84] lsbd: fix memory allocation priority LSBD code now uses GFP_NOIO priority to avoid deadlocks. --- drivers/block/lsbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/lsbd.c b/drivers/block/lsbd.c index 8ae5f1b..209dd93 100644 --- a/drivers/block/lsbd.c +++ b/drivers/block/lsbd.c @@ -835,7 +835,7 @@ static int lsbd_queue_bh(struct lsbd *p, struct buffer_head *bh, if (!move) down(&p->req_sem); /* queue non-read requests to daemon */ - r = kmalloc(sizeof(*r), GFP_KERNEL); + r = kmalloc(sizeof(*r), GFP_NOIO); if (r == NULL) { if (!move) up(&p->req_sem); @@ -1100,11 +1100,11 @@ int lsbd_write_block(struct lsbd *p) lsbd_debug(p, "writting block %d\n", p->cur_block); - bh = kmalloc(p->sectors_per_block * sizeof(*bh), GFP_KERNEL); + bh = kmalloc(p->sectors_per_block * sizeof(*bh), GFP_NOIO); if (bh == NULL) return -ENOMEM; - wbh = kmalloc(p->sectors_per_block * sizeof(*wbh), GFP_KERNEL); + wbh = kmalloc(p->sectors_per_block * sizeof(*wbh), GFP_NOIO); if (bh == NULL) { kfree(bh); return -ENOMEM; -- 1.8.4.652.g0d6e0ce