summaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2024-10-28 12:53:39 +0100
committerJakub Kicinski <kuba@kernel.org>2024-11-11 19:56:27 +0100
commit3d18dfe69ce46f106af327736d2261d7e3ee81c0 (patch)
tree508012ac2ca4270f28b0eee0cceed9959c589dfd /drivers/vhost
parentmm: page_frag: use initial zero offset for page_frag_alloc_align() (diff)
downloadlinux-3d18dfe69ce46f106af327736d2261d7e3ee81c0.tar.xz
linux-3d18dfe69ce46f106af327736d2261d7e3ee81c0.zip
mm: page_frag: avoid caller accessing 'page_frag_cache' directly
Use appropriate frag_page API instead of caller accessing 'page_frag_cache' directly. CC: Andrew Morton <akpm@linux-foundation.org> CC: Linux-MM <linux-mm@kvack.org> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Acked-by: Chuck Lever <chuck.lever@oracle.com> Link: https://patch.msgid.link/20241028115343.3405838-5-linyunsheng@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index f16279351db5..9ad37c012189 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -1325,7 +1325,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
vqs[VHOST_NET_VQ_RX]);
f->private_data = n;
- n->pf_cache.va = NULL;
+ page_frag_cache_init(&n->pf_cache);
return 0;
}