diff --git a/[refs] b/[refs] index 7861c4b6d4a1..1d40d33701ed 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9246b5f06deeea541e7c62437c2ad19a0b1172c0 +refs/heads/master: e3335de94067dbebe22e3962632ead34e832cb60 diff --git a/trunk/block/blk-core.c b/trunk/block/blk-core.c index d768a8ddc173..37fba001bdcf 100644 --- a/trunk/block/blk-core.c +++ b/trunk/block/blk-core.c @@ -436,6 +436,14 @@ void blk_put_queue(struct request_queue *q) void blk_cleanup_queue(struct request_queue *q) { + /* + * We know we have process context here, so we can be a little + * cautious and ensure that pending block actions on this device + * are done before moving on. Going into this function, we should + * not have processes doing IO to this device. + */ + blk_sync_queue(q); + mutex_lock(&q->sysfs_lock); queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q); mutex_unlock(&q->sysfs_lock);