summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-06-27 16:23:33 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-02-17 16:45:04 +0100
commit0b0ba1efc7b887bc2bd767ef822979fe2dae620e (patch)
treecb87bd0b135803615bd76eebb63ddc72bf797b20 /drivers/block/drbd/drbd_nl.c
parent1ec861ebd0889263841b822ee3f3eb49caf23656 (diff)
drbd: Add explicit device parameter to D_ASSERT
The implicit dependency on a variable inside the macro is problematic. Signed-off-by: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index af26a0b099ca..924126436a8b 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -590,7 +590,7 @@ drbd_set_role(struct drbd_device *device, enum drbd_role new_role, int force)
if (rv == SS_NO_UP_TO_DATE_DISK &&
device->state.disk == D_CONSISTENT && mask.pdsk == 0) {
- D_ASSERT(device->state.pdsk == D_UNKNOWN);
+ D_ASSERT(device, device->state.pdsk == D_UNKNOWN);
if (conn_try_outdate_peer(first_peer_device(device)->connection)) {
val.disk = D_UP_TO_DATE;
@@ -1644,7 +1644,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
* Devices and memory are no longer released by error cleanup below.
* now device takes over responsibility, and the state engine should
* clean it up somewhere. */
- D_ASSERT(device->ldev == NULL);
+ D_ASSERT(device, device->ldev == NULL);
device->ldev = nbc;
device->resync = resync_lru;
device->rs_plan_s = new_plan;
@@ -3011,8 +3011,8 @@ next_resource:
}
device = peer_device->device;
- D_ASSERT(device->vnr == volume);
- D_ASSERT(first_peer_device(device)->connection == connection);
+ D_ASSERT(device, device->vnr == volume);
+ D_ASSERT(device, first_peer_device(device)->connection == connection);
dh->minor = device_to_minor(device);
dh->ret_code = NO_ERROR;