lkml.org 
[lkml]   [2012]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/17] netvm: Allow skb allocation to use PFMEMALLOC reserves
On Thu, Jun 21, 2012 at 06:09:02PM +0200, Sebastian Andrzej Siewior wrote:
> > <SNIP>
> >
> If merge this chunk
>
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index 6510a5d..2acfec9 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -510,7 +510,7 @@ struct sk_buff {
> #define SKB_ALLOC_RX 0x02
>
> /* Returns true if the skb was allocated from PFMEMALLOC reserves */
> -static inline bool skb_pfmemalloc(struct sk_buff *skb)
> +static inline bool skb_pfmemalloc(const struct sk_buff *skb)
> {
> return unlikely(skb->pfmemalloc);
> }
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index c44ab68..6ce94b5 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -852,7 +852,7 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
>
> static inline int skb_alloc_rx_flag(const struct sk_buff *skb)
> {
> - if (skb_pfmemalloc((struct sk_buff *)skb))
> + if (skb_pfmemalloc(skb))
> return SKB_ALLOC_RX;
> return 0;
> }
>
>
> Then you should be able to drop the case in skb_alloc_rx_flag() without adding
> a warning.
>

You're right. Thanks.

--
Mel Gorman
SUSE Labs


\
 
 \ /
  Last update: 2012-06-22 12:41    [W:0.256 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site