Message ID | 1554734902-8295-1-git-send-email-xianting_tian@126.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: convert kmalloc_node to kzalloc_node | expand |
On 4/8/19 8:48 AM, Tian Xianting wrote: > Use kzalloc_node to zero allocated buffer, as deadline and cfq I/O > scheduler initialization function (deadline_init_queue, cfq_init_queue) > did. noop doesn't exist in current kernels.
hi axboe, thanks a lot for your reply, the patch is based on linux stable branch 4.20.17, i saw it was tagged with "EOL" at 2019-03-19. so it won't be maintained any more? -- 发自我的网易邮箱手机智能版 在 2019-04-08 23:02:09,"Jens Axboe" <axboe@kernel.dk> 写道: >On 4/8/19 8:48 AM, Tian Xianting wrote: >> Use kzalloc_node to zero allocated buffer, as deadline and cfq I/O >> scheduler initialization function (deadline_init_queue, cfq_init_queue) >> did. > >noop doesn't exist in current kernels. > >-- >Jens Axboe
On Mon, Apr 08, 2019 at 10:48:22AM -0400, Tian Xianting wrote: > Use kzalloc_node to zero allocated buffer, as deadline and cfq I/O > scheduler initialization function (deadline_init_queue, cfq_init_queue) > did. > > Signed-off-by: Tian Xianting <xianting_tian@126.com> > --- > block/noop-iosched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter>
diff --git a/block/noop-iosched.c b/block/noop-iosched.c index 2d1b15d..739e8cd 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c @@ -68,7 +68,7 @@ static int noop_init_queue(struct request_queue *q, struct elevator_type *e) if (!eq) return -ENOMEM; - nd = kmalloc_node(sizeof(*nd), GFP_KERNEL, q->node); + nd = kzalloc_node(sizeof(*nd), GFP_KERNEL, q->node); if (!nd) { kobject_put(&eq->kobj); return -ENOMEM;
Use kzalloc_node to zero allocated buffer, as deadline and cfq I/O scheduler initialization function (deadline_init_queue, cfq_init_queue) did. Signed-off-by: Tian Xianting <xianting_tian@126.com> --- block/noop-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)