From: Jens Axboe Date: Tue, 12 Apr 2011 08:11:24 +0000 (+0200) Subject: block: add comment on why we save and disable interrupts in flush_plug_list() X-Git-Tag: v2.6.39-rc4~22^2~7 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=188112722cce083c8f1a7d0d84f55c2cd885920c;p=~emulex%2Finfiniband.git block: add comment on why we save and disable interrupts in flush_plug_list() It's done at the top to avoid doing it for every queue we unplug. Signed-off-by: Jens Axboe --- diff --git a/block/blk-core.c b/block/blk-core.c index d20ce1e849c..0c0ea10e61e 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2696,6 +2696,11 @@ static void flush_plug_list(struct blk_plug *plug) q = NULL; depth = 0; + + /* + * Save and disable interrupts here, to avoid doing it for every + * queue lock we have to take. + */ local_irq_save(flags); while (!list_empty(&list)) { rq = list_entry_rq(list.next);