drbd: Avoid inconsistent locking warning
authorAndreas Gruenbacher <agruen@linbit.com>
Thu, 11 Sep 2014 12:29:08 +0000 (14:29 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 11 Sep 2014 14:41:29 +0000 (08:41 -0600)
request_timer_fn() takes resource->req_lock via the device and releases it via
the connection.  Avoid this as it is confusing static code checkers.

Reported-by: "Dan Carpenter" <dan.carpenter@oracle.com>
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/drbd/drbd_req.c

index c67717d572d16c89b1a4f74701b25c0a7ffeafbe..5a01c53dddeb873b5fdba6d4d06e3c9f18476a41 100644 (file)
@@ -1645,6 +1645,6 @@ void request_timer_fn(unsigned long data)
                ? oldest_submit_jif + dt : now + et;
        nt = time_before(ent, dt) ? ent : dt;
 out:
-       spin_unlock_irq(&connection->resource->req_lock);
+       spin_unlock_irq(&device->resource->req_lock);
        mod_timer(&device->request_timer, nt);
 }