diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-06-22 05:32:41 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-06-22 05:32:41 -0400 |
commit | 57fa8a1e22c5833fb2cae96af68fc39ec21cb017 (patch) | |
tree | b0bb4e4a6e04a24119da30253add9fe9ffbc8d22 /net/core/sock.c | |
parent | f267f9dff8ba00a8b11f340da3634858ad50ebab (diff) | |
parent | c99d49a8f81fb35e67b0ffa45f320a75e0b5639d (diff) |
Merge tag 'asoc-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Further updates for v4.2
There's a bunch of additional updates and fixes that came in since my
orignal pull request here, including DT support for rt5645 and fairly
large serieses of cleanups and improvements to tas2552 and rcar.
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 292f42228bfb..dc30dc5bb1b8 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -354,15 +354,12 @@ void sk_clear_memalloc(struct sock *sk) | |||
354 | 354 | ||
355 | /* | 355 | /* |
356 | * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward | 356 | * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward |
357 | * progress of swapping. However, if SOCK_MEMALLOC is cleared while | 357 | * progress of swapping. SOCK_MEMALLOC may be cleared while |
358 | * it has rmem allocations there is a risk that the user of the | 358 | * it has rmem allocations due to the last swapfile being deactivated |
359 | * socket cannot make forward progress due to exceeding the rmem | 359 | * but there is a risk that the socket is unusable due to exceeding |
360 | * limits. By rights, sk_clear_memalloc() should only be called | 360 | * the rmem limits. Reclaim the reserves and obey rmem limits again. |
361 | * on sockets being torn down but warn and reset the accounting if | ||
362 | * that assumption breaks. | ||
363 | */ | 361 | */ |
364 | if (WARN_ON(sk->sk_forward_alloc)) | 362 | sk_mem_reclaim(sk); |
365 | sk_mem_reclaim(sk); | ||
366 | } | 363 | } |
367 | EXPORT_SYMBOL_GPL(sk_clear_memalloc); | 364 | EXPORT_SYMBOL_GPL(sk_clear_memalloc); |
368 | 365 | ||
@@ -1883,7 +1880,7 @@ bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t gfp) | |||
1883 | 1880 | ||
1884 | pfrag->offset = 0; | 1881 | pfrag->offset = 0; |
1885 | if (SKB_FRAG_PAGE_ORDER) { | 1882 | if (SKB_FRAG_PAGE_ORDER) { |
1886 | pfrag->page = alloc_pages(gfp | __GFP_COMP | | 1883 | pfrag->page = alloc_pages((gfp & ~__GFP_WAIT) | __GFP_COMP | |
1887 | __GFP_NOWARN | __GFP_NORETRY, | 1884 | __GFP_NOWARN | __GFP_NORETRY, |
1888 | SKB_FRAG_PAGE_ORDER); | 1885 | SKB_FRAG_PAGE_ORDER); |
1889 | if (likely(pfrag->page)) { | 1886 | if (likely(pfrag->page)) { |