diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2010-12-21 08:46:57 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-08-29 05:26:58 -0400 |
commit | 70dc65e1b3453c5b78ab8ec6bfb604aee7038ae3 (patch) | |
tree | e273fbfd2fa4dbd4a421d236a23f5261e958ccd8 /drivers/block/drbd/drbd_main.c | |
parent | 841ce241fa355048f66172a47e356bb6e9159c9d (diff) |
drbd: Remove some useless paranoia code
The open_cnt check is an open-coded D_ASSERT() check.
In case the data.work queue is not empty, it does not really help to
know which drbd_work elements remained on that list: they will be freed
immediately afterwards, anyway.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 46ba4aa03f3f..2902f6dd7bf1 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -3254,16 +3254,8 @@ static void drbd_delete_device(unsigned int minor) | |||
3254 | return; | 3254 | return; |
3255 | 3255 | ||
3256 | /* paranoia asserts */ | 3256 | /* paranoia asserts */ |
3257 | if (mdev->open_cnt != 0) | 3257 | D_ASSERT(mdev->open_cnt == 0); |
3258 | dev_err(DEV, "open_cnt = %d in %s:%u", mdev->open_cnt, | 3258 | D_ASSERT(list_empty(&mdev->data.work.q)); |
3259 | __FILE__ , __LINE__); | ||
3260 | |||
3261 | if (!expect(list_empty(&mdev->data.work.q))) { | ||
3262 | struct list_head *lp; | ||
3263 | list_for_each(lp, &mdev->data.work.q) { | ||
3264 | dev_err(DEV, "lp = %p\n", lp); | ||
3265 | } | ||
3266 | }; | ||
3267 | /* end paranoia asserts */ | 3259 | /* end paranoia asserts */ |
3268 | 3260 | ||
3269 | del_gendisk(mdev->vdisk); | 3261 | del_gendisk(mdev->vdisk); |