Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit cc8f7fe1 authored by Haimin Zhang's avatar Haimin Zhang Committed by Jens Axboe
Browse files

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: default avatarHaimin Zhang <tcs.kernel@gmail.com>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220216084038.15635-1-tcs.kernel@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 06582bc8
Branches
Tags
No related merge requests found
......@@ -446,7 +446,7 @@ static struct bio *bio_copy_kern(struct request_queue *q, void *data,
if (bytes > len)
bytes = len;
page = alloc_page(GFP_NOIO | gfp_mask);
page = alloc_page(GFP_NOIO | __GFP_ZERO | gfp_mask);
if (!page)
goto cleanup;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment