summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2005-07-29 06:15:57 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 06:46:03 +0200
commitcf222b3769c3759488579441ab724ed33a2da5f4 (patch)
treeb49e2a731a02cc9a280183232ecad5c165f121eb /drivers/md/dm-table.c
parent[PATCH] x86_64: fix cpu_to_node setup for sparse apic_ids (diff)
downloadlinux-cf222b3769c3759488579441ab724ed33a2da5f4.tar.xz
linux-cf222b3769c3759488579441ab724ed33a2da5f4.zip
[PATCH] device-mapper: fix deadlocks in core (prep)
Some code tidy-ups in preparation for the next patches. Change dm_table_pre/postsuspend_targets to accept NULL. Use dm_suspended() throughout. Signed-Off-By: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index a5a4c0ed8a14..a6d3baa46f61 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -869,11 +869,17 @@ static void suspend_targets(struct dm_table *t, unsigned postsuspend)
void dm_table_presuspend_targets(struct dm_table *t)
{
+ if (!t)
+ return;
+
return suspend_targets(t, 0);
}
void dm_table_postsuspend_targets(struct dm_table *t)
{
+ if (!t)
+ return;
+
return suspend_targets(t, 1);
}