Skip to content

Commit

Permalink
skbuff: constify skb_propagate_pfmemalloc() "page" argument
Browse files Browse the repository at this point in the history
The function doesn't write anything to the page struct itself,
so this argument can be const.

Misc: align second argument to the brace while at it.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Alexander Lobakin authored and Jakub Kicinski committed Feb 5, 2021
1 parent 1d7bab6 commit 48f971c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -2943,8 +2943,8 @@ static inline struct page *dev_alloc_page(void)
* @page: The page that was allocated from skb_alloc_page
* @skb: The skb that may need pfmemalloc set
*/
static inline void skb_propagate_pfmemalloc(struct page *page,
struct sk_buff *skb)
static inline void skb_propagate_pfmemalloc(const struct page *page,
struct sk_buff *skb)
{
if (page_is_pfmemalloc(page))
skb->pfmemalloc = true;
Expand Down

0 comments on commit 48f971c

Please sign in to comment.