提交 2238c4da 编写于 作者: A Alexander Lobakin 提交者: Zheng Zengkai

skbuff: constify skb_propagate_pfmemalloc() "page" argument

mainline inclusion
from mainline-v5.12-rc1-dontuse
commit 48f971c9
category: feature
bugzilla: 173966
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=48f971c9c80a728646fc03367a28df747f20d0f4

----------------------------------------------------------------------

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: NAlexander Lobakin <alobakin@pm.me>
Reviewed-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: NDavid Rientjes <rientjes@google.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Reviewed-by: NYongxin Li <liyongxin1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 2e5f71ad
...@@ -2927,7 +2927,7 @@ static inline struct page *dev_alloc_page(void) ...@@ -2927,7 +2927,7 @@ static inline struct page *dev_alloc_page(void)
* @page: The page that was allocated from skb_alloc_page * @page: The page that was allocated from skb_alloc_page
* @skb: The skb that may need pfmemalloc set * @skb: The skb that may need pfmemalloc set
*/ */
static inline void skb_propagate_pfmemalloc(struct page *page, static inline void skb_propagate_pfmemalloc(const struct page *page,
struct sk_buff *skb) struct sk_buff *skb)
{ {
if (page_is_pfmemalloc(page)) if (page_is_pfmemalloc(page))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册