diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-07-07 14:19:42 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 16:46:46 +0100 |
commit | 0500813fe0c9a617ace86d91344e36839050dad6 (patch) | |
tree | e866ddce790b671cea8dd2034a3de6f08d50f1ff /drivers/block/drbd/drbd_req.c | |
parent | 3ab706fe52a5cc12b021d7861943581db766a171 (diff) |
drbd: Move conf_mutex from connection to resource
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_req.c')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index e772b523ebb..f74c0a244e9 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -851,9 +851,9 @@ static void complete_conflicting_writes(struct drbd_request *req) break; /* Indicate to wake up device->misc_wait on progress. */ i->waiting = true; - spin_unlock_irq(&first_peer_device(device)->connection->req_lock); + spin_unlock_irq(&device->resource->req_lock); schedule(); - spin_lock_irq(&first_peer_device(device)->connection->req_lock); + spin_lock_irq(&device->resource->req_lock); } finish_wait(&device->misc_wait, &wait); } @@ -1078,7 +1078,7 @@ static void drbd_send_and_submit(struct drbd_device *device, struct drbd_request struct bio_and_error m = { NULL, }; bool no_remote = false; - spin_lock_irq(&first_peer_device(device)->connection->req_lock); + spin_lock_irq(&device->resource->req_lock); if (rw == WRITE) { /* This may temporarily give up the req_lock, * but will re-aquire it before it returns here. @@ -1140,9 +1140,9 @@ static void drbd_send_and_submit(struct drbd_device *device, struct drbd_request /* needs to be marked within the same spinlock */ _req_mod(req, TO_BE_SUBMITTED); /* but we need to give up the spinlock to submit */ - spin_unlock_irq(&first_peer_device(device)->connection->req_lock); + spin_unlock_irq(&device->resource->req_lock); drbd_submit_req_private_bio(req); - spin_lock_irq(&first_peer_device(device)->connection->req_lock); + spin_lock_irq(&device->resource->req_lock); } else if (no_remote) { nodata: if (__ratelimit(&drbd_ratelimit_state)) @@ -1155,7 +1155,7 @@ nodata: out: if (drbd_req_put_completion_ref(req, &m, 1)) kref_put(&req->kref, drbd_req_destroy); - spin_unlock_irq(&first_peer_device(device)->connection->req_lock); + spin_unlock_irq(&device->resource->req_lock); if (m.bio) complete_master_bio(device, &m); @@ -1360,10 +1360,10 @@ void request_timer_fn(unsigned long data) now = jiffies; - spin_lock_irq(&connection->req_lock); + spin_lock_irq(&device->resource->req_lock); req = find_oldest_request(connection); if (!req) { - spin_unlock_irq(&connection->req_lock); + spin_unlock_irq(&device->resource->req_lock); mod_timer(&device->request_timer, now + et); return; } @@ -1397,6 +1397,6 @@ void request_timer_fn(unsigned long data) __drbd_chk_io_error(device, DRBD_FORCE_DETACH); } nt = (time_after(now, req->start_time + et) ? now : req->start_time) + et; - spin_unlock_irq(&connection->req_lock); + spin_unlock_irq(&connection->resource->req_lock); mod_timer(&device->request_timer, nt); } |