]> Git Repo - linux.git/commitdiff
fs/ocfs2/cluster: use offset_in_page() macro
authorGeliang Tang <[email protected]>
Wed, 3 May 2017 21:51:44 +0000 (14:51 -0700)
committerLinus Torvalds <[email protected]>
Wed, 3 May 2017 22:52:07 +0000 (15:52 -0700)
Use offset_in_page() macro instead of open-coding.

Link: http://lkml.kernel.org/r/4dbc77ccaaed98b183cf4dba58a4fa325fd65048.1492758503.git.geliangtang@gmail.com
Signed-off-by: Geliang Tang <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Joseph Qi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/ocfs2/cluster/tcp.c

index a4a6ba23b9a6993d53fd3dd6464d5de5dc9ecb23..8d779227370ab1d121fdc2fc6f546f7844e95a5b 100644 (file)
@@ -955,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)
This page took 0.052976 seconds and 4 git commands to generate.