Wu Fengguang aa1330766c tcp: replace hard coded GFP_KERNEL with sk_allocation
This fixed a lockdep warning which appeared when doing stress
memory tests over NFS:

	inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.

	page reclaim => nfs_writepage => tcp_sendmsg => lock sk_lock

	mount_root => nfs_root_data => tcp_close => lock sk_lock =>
			tcp_send_fin => alloc_skb_fclone => page reclaim

David raised a concern that if the allocation fails in tcp_send_fin(), and it's
GFP_ATOMIC, we are going to yield() (which sleeps) and loop endlessly waiting
for the allocation to succeed.

But fact is, the original GFP_KERNEL also sleeps. GFP_ATOMIC+yield() looks
weird, but it is no worse the implicit sleep inside GFP_KERNEL. Both could
loop endlessly under memory pressure.

CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
CC: David S. Miller <davem@davemloft.net>
CC: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02 23:45:45 -07:00
..
2008-10-29 12:52:50 -07:00
2008-11-25 17:35:18 -08:00
2009-06-03 02:51:04 -07:00
2009-08-13 16:43:31 -07:00
2009-09-02 18:05:33 -07:00
2009-09-02 01:03:53 -07:00
2009-09-01 17:40:57 -07:00
2009-06-03 02:51:04 -07:00
2009-08-05 10:42:58 -07:00
2008-06-11 21:00:38 -07:00
2009-09-02 18:05:33 -07:00
2009-09-01 17:40:31 -07:00
2009-09-02 18:05:33 -07:00
2008-11-25 17:59:52 -08:00
2009-06-03 02:51:04 -07:00
2009-06-03 02:51:04 -07:00