aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_req.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_req.c')
-rw-r--r--drivers/block/drbd/drbd_req.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index e772b523ebba..f74c0a244e9a 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)
851 break; 851 break;
852 /* Indicate to wake up device->misc_wait on progress. */ 852 /* Indicate to wake up device->misc_wait on progress. */
853 i->waiting = true; 853 i->waiting = true;
854 spin_unlock_irq(&first_peer_device(device)->connection->req_lock); 854 spin_unlock_irq(&device->resource->req_lock);
855 schedule(); 855 schedule();
856 spin_lock_irq(&first_peer_device(device)->connection->req_lock); 856 spin_lock_irq(&device->resource->req_lock);
857 } 857 }
858 finish_wait(&device->misc_wait, &wait); 858 finish_wait(&device->misc_wait, &wait);
859} 859}
@@ -1078,7 +1078,7 @@ static void drbd_send_and_submit(struct drbd_device *device, struct drbd_request
1078 struct bio_and_error m = { NULL, }; 1078 struct bio_and_error m = { NULL, };
1079 bool no_remote = false; 1079 bool no_remote = false;
1080 1080
1081 spin_lock_irq(&first_peer_device(device)->connection->req_lock); 1081 spin_lock_irq(&device->resource->req_lock);
1082 if (rw == WRITE) { 1082 if (rw == WRITE) {
1083 /* This may temporarily give up the req_lock, 1083 /* This may temporarily give up the req_lock,
1084 * but will re-aquire it before it returns here. 1084 * 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
1140 /* needs to be marked within the same spinlock */ 1140 /* needs to be marked within the same spinlock */
1141 _req_mod(req, TO_BE_SUBMITTED); 1141 _req_mod(req, TO_BE_SUBMITTED);
1142 /* but we need to give up the spinlock to submit */ 1142 /* but we need to give up the spinlock to submit */
1143 spin_unlock_irq(&first_peer_device(device)->connection->req_lock); 1143 spin_unlock_irq(&device->resource->req_lock);
1144 drbd_submit_req_private_bio(req); 1144 drbd_submit_req_private_bio(req);
1145 spin_lock_irq(&first_peer_device(device)->connection->req_lock); 1145 spin_lock_irq(&device->resource->req_lock);
1146 } else if (no_remote) { 1146 } else if (no_remote) {
1147nodata: 1147nodata:
1148 if (__ratelimit(&drbd_ratelimit_state)) 1148 if (__ratelimit(&drbd_ratelimit_state))
@@ -1155,7 +1155,7 @@ nodata:
1155out: 1155out:
1156 if (drbd_req_put_completion_ref(req, &m, 1)) 1156 if (drbd_req_put_completion_ref(req, &m, 1))
1157 kref_put(&req->kref, drbd_req_destroy); 1157 kref_put(&req->kref, drbd_req_destroy);
1158 spin_unlock_irq(&first_peer_device(device)->connection->req_lock); 1158 spin_unlock_irq(&device->resource->req_lock);
1159 1159
1160 if (m.bio) 1160 if (m.bio)
1161 complete_master_bio(device, &m); 1161 complete_master_bio(device, &m);
@@ -1360,10 +1360,10 @@ void request_timer_fn(unsigned long data)
1360 1360
1361 now = jiffies; 1361 now = jiffies;
1362 1362
1363 spin_lock_irq(&connection->req_lock); 1363 spin_lock_irq(&device->resource->req_lock);
1364 req = find_oldest_request(connection); 1364 req = find_oldest_request(connection);
1365 if (!req) { 1365 if (!req) {
1366 spin_unlock_irq(&connection->req_lock); 1366 spin_unlock_irq(&device->resource->req_lock);
1367 mod_timer(&device->request_timer, now + et); 1367 mod_timer(&device->request_timer, now + et);
1368 return; 1368 return;
1369 } 1369 }
@@ -1397,6 +1397,6 @@ void request_timer_fn(unsigned long data)
1397 __drbd_chk_io_error(device, DRBD_FORCE_DETACH); 1397 __drbd_chk_io_error(device, DRBD_FORCE_DETACH);
1398 } 1398 }
1399 nt = (time_after(now, req->start_time + et) ? now : req->start_time) + et; 1399 nt = (time_after(now, req->start_time + et) ? now : req->start_time) + et;
1400 spin_unlock_irq(&connection->req_lock); 1400 spin_unlock_irq(&connection->resource->req_lock);
1401 mod_timer(&device->request_timer, nt); 1401 mod_timer(&device->request_timer, nt);
1402} 1402}