]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/ocfs2/cluster/tcp.c
fs/ocfs2/cluster: use offset_in_page() macro
[mirror_ubuntu-artful-kernel.git] / fs / ocfs2 / cluster / tcp.c
index 5b51c31c892d54e36c74de081fddb0375a26acf5..8d779227370ab1d121fdc2fc6f546f7844e95a5b 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");
 
@@ -956,7 +955,7 @@ static void o2net_sendpage(struct o2net_sock_container *sc,
                mutex_lock(&sc->sc_send_lock);
                ret = sc->sc_sock->ops->sendpage(sc->sc_sock,
                                                 virt_to_page(kmalloced_virt),
-                                                (long)kmalloced_virt & ~PAGE_MASK,
+                                                offset_in_page(kmalloced_virt),
                                                 size, MSG_DONTWAIT);
                mutex_unlock(&sc->sc_send_lock);
                if (ret == size)