提交 70dc65e1 编写于 作者: A Andreas Gruenbacher 提交者: Philipp Reisner

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: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 841ce241
......@@ -3254,16 +3254,8 @@ static void drbd_delete_device(unsigned int minor)
return;
/* paranoia asserts */
if (mdev->open_cnt != 0)
dev_err(DEV, "open_cnt = %d in %s:%u", mdev->open_cnt,
__FILE__ , __LINE__);
if (!expect(list_empty(&mdev->data.work.q))) {
struct list_head *lp;
list_for_each(lp, &mdev->data.work.q) {
dev_err(DEV, "lp = %p\n", lp);
}
};
D_ASSERT(mdev->open_cnt == 0);
D_ASSERT(list_empty(&mdev->data.work.q));
/* end paranoia asserts */
del_gendisk(mdev->vdisk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册