]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
fs/ocfs2/cluster: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Wed, 3 May 2017 21:51:38 +0000 (14:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 May 2017 22:52:07 +0000 (15:52 -0700)
Use setup_timer() instead of init_timer() to simplify the code.

Link: http://lkml.kernel.org/r/5e75bf07beb91e092d5aa36c36769949a480456a.1489060564.git.geliangtang@gmail.com
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/cluster/tcp.c

index 5b51c31c892d54e36c74de081fddb0375a26acf5..a4a6ba23b9a6993d53fd3dd6464d5de5dc9ecb23 100644 (file)
@@ -450,9 +450,8 @@ static struct o2net_sock_container *sc_alloc(struct o2nm_node *node)
        INIT_WORK(&sc->sc_shutdown_work, o2net_shutdown_sc);
        INIT_DELAYED_WORK(&sc->sc_keepalive_work, o2net_sc_send_keep_req);
 
-       init_timer(&sc->sc_idle_timeout);
-       sc->sc_idle_timeout.function = o2net_idle_timer;
-       sc->sc_idle_timeout.data = (unsigned long)sc;
+       setup_timer(&sc->sc_idle_timeout, o2net_idle_timer,
+                   (unsigned long)sc);
 
        sclog(sc, "alloced\n");