diff mbox

[net-next] net: remove useless pfmemalloc setting

Message ID 1486001603.13103.10.camel@edumazet-glaptop3.roam.corp.google.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Feb. 2, 2017, 2:13 a.m. UTC
From: Eric Dumazet <edumazet@google.com>

When __alloc_skb() allocates an skb from fast clone cache,
setting pfmemalloc on the clone is not needed.

Clone will be properly initialized later at skb_clone() time,
including pfmemalloc field, as it is included in the
headers_start/headers_end section which is fully copied.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/core/skbuff.c |    1 -
 1 file changed, 1 deletion(-)

Comments

David Miller Feb. 3, 2017, 4:03 a.m. UTC | #1
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 01 Feb 2017 18:13:23 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> When __alloc_skb() allocates an skb from fast clone cache,
> setting pfmemalloc on the clone is not needed.
> 
> Clone will be properly initialized later at skb_clone() time,
> including pfmemalloc field, as it is included in the
> headers_start/headers_end section which is fully copied.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.
diff mbox

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 26c1344cc23e31d4248d23fc007bcab4b034c5c9..4f8f2a1a66b5a36705e8f9966f7abd751932dcc6 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -271,7 +271,6 @@  struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
 		atomic_set(&fclones->fclone_ref, 1);
 
 		fclones->skb2.fclone = SKB_FCLONE_CLONE;
-		fclones->skb2.pfmemalloc = pfmemalloc;
 	}
 out:
 	return skb;