From 423ce9cf9ec308803807737cf104a3c0f17237f4 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 13 Jun 2006 15:33:10 +0100 Subject: [PATCH] [LINUX] A better way to stop blkdev request handling in blkfront driver. Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c index bb71828909..1a2156600d 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c @@ -596,8 +596,7 @@ void do_blkif_request(request_queue_t *rq) continue; } - if (unlikely(info->connected != BLKIF_STATE_CONNECTED) || - RING_FULL(&info->ring)) + if (RING_FULL(&info->ring)) goto wait; DPRINTK("do_blk_req %p: cmd %p, sec %lx, " @@ -697,6 +696,7 @@ static void blkif_free(struct blkfront_info *info, int suspend) spin_lock_irq(&blkif_io_lock); info->connected = suspend ? BLKIF_STATE_SUSPENDED : BLKIF_STATE_DISCONNECTED; + blk_stop_queue(info->rq); /* no more blkif_request() */ spin_unlock_irq(&blkif_io_lock); /* Free resources associated with old device channel. */ -- 2.30.2