diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2011-04-12 10:11:24 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-04-12 10:12:29 +0200 |
commit | 188112722cce083c8f1a7d0d84f55c2cd885920c (patch) | |
tree | eb285b823d2dd5a7fa88e9d6a1ee77299c14ff88 /block/blk-core.c | |
parent | 94b5eb28b41cc79d9713696e0005ae167b5afd1b (diff) |
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 <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |