lkml.org 
[lkml]   [2012]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlinux-next: manual merge of the akpm tree with the nfs tree
Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
net/sunrpc/xprtsock.c between commit 5cf02d09b50b ("nfs: skip commit in
releasepage if we're freeing memory for fs-related reasons") from the nfs
tree and commit "nfs: enable swap on NFS" from the akpm tree.

Just context changes? I fixed it up (I think - see below) and can carry
the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au

diff --cc net/sunrpc/xprtsock.c
index 9266794,83bb0eb..0000000
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@@ -1927,9 -1925,47 +1927,48 @@@ static void xs_local_setup_socket(struc
out:
xprt_clear_connecting(xprt);
xprt_wake_pending_tasks(xprt, status);
+ current->flags &= ~PF_FSTRANS;
}
+ #ifdef CONFIG_SUNRPC_SWAP
+ static void xs_set_memalloc(struct rpc_xprt *xprt)
+ {
+ struct sock_xprt *transport = container_of(xprt, struct sock_xprt,
+ xprt);
+
+ if (xprt->swapper)
+ sk_set_memalloc(transport->inet);
+ }
+
+ /**
+ * xs_swapper - Tag this transport as being used for swap.
+ * @xprt: transport to tag
+ * @enable: enable/disable
+ *
+ */
+ int xs_swapper(struct rpc_xprt *xprt, int enable)
+ {
+ struct sock_xprt *transport = container_of(xprt, struct sock_xprt,
+ xprt);
+ int err = 0;
+
+ if (enable) {
+ xprt->swapper++;
+ xs_set_memalloc(xprt);
+ } else if (xprt->swapper) {
+ xprt->swapper--;
+ sk_clear_memalloc(transport->inet);
+ }
+
+ return err;
+ }
+ EXPORT_SYMBOL_GPL(xs_swapper);
+ #else
+ static void xs_set_memalloc(struct rpc_xprt *xprt)
+ {
+ }
+ #endif
+
static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
{
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
@@@ -1970,7 -2009,8 +2012,9 @@@ static void xs_udp_setup_socket(struct
if (xprt->shutdown)
goto out;
+ current->flags |= PF_FSTRANS;
+ if (xprt->swapper)
+ current->flags |= PF_MEMALLOC;
/* Start by resetting any existing state */
xs_reset_transport(transport);
@@@ -1990,7 -2030,7 +2034,8 @@@
out:
xprt_clear_connecting(xprt);
xprt_wake_pending_tasks(xprt, status);
+ tsk_restore_flags(current, pflags, PF_MEMALLOC);
+ current->flags &= ~PF_FSTRANS;
}
/*
@@@ -2116,7 -2159,8 +2164,9 @@@ static void xs_tcp_setup_socket(struct
if (xprt->shutdown)
goto out;
+ current->flags |= PF_FSTRANS;
+ if (xprt->swapper)
+ current->flags |= PF_MEMALLOC;
if (!sock) {
clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
@@@ -2167,7 -2211,7 +2217,8 @@@
case -EINPROGRESS:
case -EALREADY:
xprt_clear_connecting(xprt);
+ tsk_restore_flags(current, pflags, PF_MEMALLOC);
+ current->flags &= ~PF_FSTRANS;
return;
case -EINVAL:
/* Happens, for instance, if the user specified a link
@@@ -2180,7 -2224,7 +2231,8 @@@ out_eagain
out:
xprt_clear_connecting(xprt);
xprt_wake_pending_tasks(xprt, status);
+ tsk_restore_flags(current, pflags, PF_MEMALLOC);
+ current->flags &= ~PF_FSTRANS;
}
/**[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-07-31 07:01    [W:0.832 / U:0.580 seconds]
©2003-2014 Jasper Spaans. Advertise on this site