dm.c (ff36e78fdb251b9fa65028554689806961e011eb) dm.c (adc0daad366b62ca1bce3e2958a40b0b71a8b8b3)
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-core.h"

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

2363 /*
2364 * Take suspend_lock so that presuspend and postsuspend methods
2365 * do not race with internal suspend.
2366 */
2367 mutex_lock(&md->suspend_lock);
2368 map = dm_get_live_table(md, &srcu_idx);
2369 if (!dm_suspended_md(md)) {
2370 dm_table_presuspend_targets(map);
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-core.h"

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

2363 /*
2364 * Take suspend_lock so that presuspend and postsuspend methods
2365 * do not race with internal suspend.
2366 */
2367 mutex_lock(&md->suspend_lock);
2368 map = dm_get_live_table(md, &srcu_idx);
2369 if (!dm_suspended_md(md)) {
2370 dm_table_presuspend_targets(map);
2371 set_bit(DMF_SUSPENDED, &md->flags);
2371 dm_table_postsuspend_targets(map);
2372 }
2373 /* dm_put_live_table must be before msleep, otherwise deadlock is possible */
2374 dm_put_live_table(md, srcu_idx);
2375 mutex_unlock(&md->suspend_lock);
2376
2377 /*
2378 * Rare, but there may be I/O requests still going to complete,

--- 843 unchanged lines hidden ---
2372 dm_table_postsuspend_targets(map);
2373 }
2374 /* dm_put_live_table must be before msleep, otherwise deadlock is possible */
2375 dm_put_live_table(md, srcu_idx);
2376 mutex_unlock(&md->suspend_lock);
2377
2378 /*
2379 * Rare, but there may be I/O requests still going to complete,

--- 843 unchanged lines hidden ---