diff options
author | Alasdair G Kergon <agk@redhat.com> | 2005-07-28 21:15:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-28 21:46:03 -0700 |
commit | cf222b3769c3759488579441ab724ed33a2da5f4 (patch) | |
tree | b49e2a731a02cc9a280183232ecad5c165f121eb /drivers/md/dm-table.c | |
parent | 8c56ac3f3b12936b03d2626c7572fed5977af515 (diff) | |
download | linux-3.10-cf222b3769c3759488579441ab724ed33a2da5f4.tar.gz linux-3.10-cf222b3769c3759488579441ab724ed33a2da5f4.tar.bz2 linux-3.10-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index a5a4c0ed8a1..a6d3baa46f6 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); } |