diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-06-27 16:23:33 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 16:45:04 +0100 |
commit | 0b0ba1efc7b887bc2bd767ef822979fe2dae620e (patch) | |
tree | cb87bd0b135803615bd76eebb63ddc72bf797b20 /drivers/block/drbd/drbd_worker.c | |
parent | 1ec861ebd0889263841b822ee3f3eb49caf23656 (diff) | |
download | linux-stable-0b0ba1efc7b887bc2bd767ef822979fe2dae620e.tar.gz linux-stable-0b0ba1efc7b887bc2bd767ef822979fe2dae620e.tar.bz2 linux-stable-0b0ba1efc7b887bc2bd767ef822979fe2dae620e.zip |
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_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index 53be1eaa95de..db63b1ff4b35 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -881,7 +881,7 @@ int drbd_resync_finished(struct drbd_device *device) khelper_cmd = "out-of-sync"; } } else { - D_ASSERT((n_oos - device->rs_failed) == 0); + D_ASSERT(device, (n_oos - device->rs_failed) == 0); if (os.conn == C_SYNC_TARGET || os.conn == C_PAUSED_SYNC_T) khelper_cmd = "after-resync-target"; @@ -1099,7 +1099,7 @@ int w_e_end_csum_rs_req(struct drbd_work *w, int cancel) * introducing more locking mechanisms */ if (first_peer_device(device)->connection->csums_tfm) { digest_size = crypto_hash_digestsize(first_peer_device(device)->connection->csums_tfm); - D_ASSERT(digest_size == di->digest_size); + D_ASSERT(device, digest_size == di->digest_size); digest = kmalloc(digest_size, GFP_NOIO); } if (digest) { @@ -1223,7 +1223,7 @@ int w_e_end_ov_reply(struct drbd_work *w, int cancel) if (digest) { drbd_csum_ee(device, first_peer_device(device)->connection->verify_tfm, peer_req, digest); - D_ASSERT(digest_size == di->digest_size); + D_ASSERT(device, digest_size == di->digest_size); eq = !memcmp(digest, di->digest, digest_size); kfree(digest); } @@ -1936,7 +1936,7 @@ int drbd_worker(struct drbd_thread *thi) rcu_read_lock(); idr_for_each_entry(&connection->peer_devices, peer_device, vnr) { struct drbd_device *device = peer_device->device; - D_ASSERT(device->state.disk == D_DISKLESS && device->state.conn == C_STANDALONE); + D_ASSERT(device, device->state.disk == D_DISKLESS && device->state.conn == C_STANDALONE); kref_get(&device->kref); rcu_read_unlock(); drbd_device_cleanup(device); |