dm.c (621739b00e16ca2d80411dc9b111cb15b91f3ba9) dm.c (b06075a98d595b761881fb2d7b8a557ea2f8b7ac)
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm.h"

--- 2263 unchanged lines hidden (view full) ---

2272 md->queue->backing_dev_info.congested_fn = dm_any_congested;
2273 md->queue->backing_dev_info.congested_data = md;
2274
2275 blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY);
2276}
2277
2278static void cleanup_mapped_device(struct mapped_device *md)
2279{
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm.h"

--- 2263 unchanged lines hidden (view full) ---

2272 md->queue->backing_dev_info.congested_fn = dm_any_congested;
2273 md->queue->backing_dev_info.congested_data = md;
2274
2275 blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY);
2276}
2277
2278static void cleanup_mapped_device(struct mapped_device *md)
2279{
2280 cleanup_srcu_struct(&md->io_barrier);
2281
2282 if (md->wq)
2283 destroy_workqueue(md->wq);
2284 if (md->kworker_task)
2285 kthread_stop(md->kworker_task);
2286 if (md->io_pool)
2287 mempool_destroy(md->io_pool);
2288 if (md->rq_pool)
2289 mempool_destroy(md->rq_pool);
2290 if (md->bs)
2291 bioset_free(md->bs);
2292
2280 if (md->wq)
2281 destroy_workqueue(md->wq);
2282 if (md->kworker_task)
2283 kthread_stop(md->kworker_task);
2284 if (md->io_pool)
2285 mempool_destroy(md->io_pool);
2286 if (md->rq_pool)
2287 mempool_destroy(md->rq_pool);
2288 if (md->bs)
2289 bioset_free(md->bs);
2290
2291 cleanup_srcu_struct(&md->io_barrier);
2292
2293 if (md->disk) {
2294 spin_lock(&_minor_lock);
2295 md->disk->private_data = NULL;
2296 spin_unlock(&_minor_lock);
2297 if (blk_get_integrity(md->disk))
2298 blk_integrity_unregister(md->disk);
2299 del_gendisk(md->disk);
2300 put_disk(md->disk);

--- 1373 unchanged lines hidden ---
2293 if (md->disk) {
2294 spin_lock(&_minor_lock);
2295 md->disk->private_data = NULL;
2296 spin_unlock(&_minor_lock);
2297 if (blk_get_integrity(md->disk))
2298 blk_integrity_unregister(md->disk);
2299 del_gendisk(md->disk);
2300 put_disk(md->disk);

--- 1373 unchanged lines hidden ---