linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs/ocfs2/cluster: use offset_in_page() macro
@ 2017-04-22  1:21 Geliang Tang
  2017-04-22  1:21 ` [PATCH] gdth: " Geliang Tang
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Geliang Tang @ 2017-04-22  1:21 UTC (permalink / raw)
  To: Mark Fasheh, Joel Becker, Andrew Morton, David S. Miller,
	Ingo Molnar, Tejun Heo, Al Viro, David Howells, Peter Zijlstra,
	Eric Dumazet
  Cc: Geliang Tang, ocfs2-devel, linux-kernel

Use offset_in_page() macro instead of open-coding.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 fs/ocfs2/cluster/tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index a4a6ba2..8d77922 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -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)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-05-02  8:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-22  1:21 [PATCH] fs/ocfs2/cluster: use offset_in_page() macro Geliang Tang
2017-04-22  1:21 ` [PATCH] gdth: " Geliang Tang
2017-04-22  1:21 ` [PATCH] net: atheros: atl1: " Geliang Tang
2017-04-24 17:58   ` David Miller
2017-04-22  1:21 ` [PATCH] serial: pch_uart: " Geliang Tang
2017-04-22  1:21 ` [PATCH] tty/serial: atmel: " Geliang Tang
2017-04-24  7:12   ` Richard Genoud
2017-04-29  1:39     ` [PATCH v2] " Geliang Tang
2017-05-02  8:47       ` Richard Genoud
2017-04-22  1:21 ` [PATCH] xen/scsifront: " Geliang Tang
2017-04-24  5:05   ` Juergen Gross
2017-04-24 22:15     ` Martin K. Petersen
2017-04-25  5:07       ` Juergen Gross
2017-04-25  6:58   ` Juergen Gross
2017-04-22  1:21 ` [PATCH] xprtrdma: " Geliang Tang
2017-04-22  3:37   ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).