]> git.baikalelectronics.ru Git - kernel.git/commit
sunrpc: if we're closing down a socket, clear memalloc on it first
authorJeff Layton <jlayton@poochiereds.net>
Wed, 3 Jun 2015 20:14:27 +0000 (16:14 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 10 Jun 2015 22:26:22 +0000 (18:26 -0400)
commite9c1dd2808c428389471d79b05ed56437b985963
tree56ff34b2f126117802326271f773f39a4a9b725d
parent0c9f122f7c5603926d68c60709802bf4a3ae362c
sunrpc: if we're closing down a socket, clear memalloc on it first

We currently increment the memalloc_socks counter if we have a xprt that
is associated with a swapfile. That socket can be replaced however
during a reconnect event, and the memalloc_socks counter is never
decremented if that occurs.

When tearing down a xprt socket, check to see if the xprt is set up for
swapping and sk_clear_memalloc before releasing the socket if so.

Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/xprtsock.c