diff options
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 8b507455f71e..4af4dc166373 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c @@ -315,7 +315,7 @@ void drbd_al_begin_io_commit(struct drbd_device *device, bool delegate) { bool locked = false; - BUG_ON(delegate && current == device->connection->worker.task); + BUG_ON(delegate && current == first_peer_device(device)->connection->worker.task); /* Serialize multiple transactions. * This uses test_and_set_bit, memory barrier is implicit. @@ -354,7 +354,7 @@ void drbd_al_begin_io_commit(struct drbd_device *device, bool delegate) */ void drbd_al_begin_io(struct drbd_device *device, struct drbd_interval *i, bool delegate) { - BUG_ON(delegate && current == device->connection->worker.task); + BUG_ON(delegate && current == first_peer_device(device)->connection->worker.task); if (drbd_al_begin_io_prepare(device, i)) drbd_al_begin_io_commit(device, delegate); @@ -614,7 +614,7 @@ static int al_write_transaction(struct drbd_device *device, bool delegate) init_completion(&al_work.event); al_work.w.cb = w_al_write_transaction; al_work.w.device = device; - drbd_queue_work_front(&device->connection->sender_work, &al_work.w); + drbd_queue_work_front(&first_peer_device(device)->connection->sender_work, &al_work.w); wait_for_completion(&al_work.event); return al_work.err; } else @@ -796,7 +796,7 @@ static void drbd_try_clear_on_disk_bm(struct drbd_device *device, sector_t secto udw->enr = ext->lce.lc_number; udw->w.cb = w_update_odbm; udw->w.device = device; - drbd_queue_work_front(&device->connection->sender_work, &udw->w); + drbd_queue_work_front(&first_peer_device(device)->connection->sender_work, &udw->w); } else { dev_warn(DEV, "Could not kmalloc an udw\n"); } |