summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_req.c
diff options
context:
space:
mode:
authorKees Cook2017-10-18 05:33:01 +0200
committerKees Cook2017-11-06 21:49:57 +0100
commit2bccef39c0d94b9ee428ae777c59cef1fced786c (patch)
tree83a1cf9ca1d307290c9e7c45cab12b27a22e4ed2 /drivers/block/drbd/drbd_req.c
parentmailbox: Convert timers to use timer_setup() (diff)
downloadkernel-qcow2-linux-2bccef39c0d94b9ee428ae777c59cef1fced786c.tar.gz
kernel-qcow2-linux-2bccef39c0d94b9ee428ae777c59cef1fced786c.tar.xz
kernel-qcow2-linux-2bccef39c0d94b9ee428ae777c59cef1fced786c.zip
drbd: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Philipp Reisner <philipp.reisner@linbit.com> Cc: Lars Ellenberg <lars.ellenberg@linbit.com> Cc: drbd-dev@lists.linbit.com Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/block/drbd/drbd_req.c')
-rw-r--r--drivers/block/drbd/drbd_req.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index de8566e55334..a500e738d929 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -1714,9 +1714,9 @@ static bool net_timeout_reached(struct drbd_request *net_req,
* to expire twice (worst case) to become effective. Good enough.
*/
-void request_timer_fn(unsigned long data)
+void request_timer_fn(struct timer_list *t)
{
- struct drbd_device *device = (struct drbd_device *) data;
+ struct drbd_device *device = from_timer(device, t, request_timer);
struct drbd_connection *connection = first_peer_device(device)->connection;
struct drbd_request *req_read, *req_write, *req_peer; /* oldest request */
struct net_conf *nc;