提交 cc8f7fe1 编写于 作者: H Haimin Zhang 提交者: Jens Axboe

block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern

Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize
the buffer of a bio.
Signed-off-by: NHaimin Zhang <tcs.kernel@gmail.com>
Reviewed-by: NChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220216084038.15635-1-tcs.kernel@gmail.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
上级 06582bc8
...@@ -446,7 +446,7 @@ static struct bio *bio_copy_kern(struct request_queue *q, void *data, ...@@ -446,7 +446,7 @@ static struct bio *bio_copy_kern(struct request_queue *q, void *data,
if (bytes > len) if (bytes > len)
bytes = len; bytes = len;
page = alloc_page(GFP_NOIO | gfp_mask); page = alloc_page(GFP_NOIO | __GFP_ZERO | gfp_mask);
if (!page) if (!page)
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册