[PATCH] block: convert kmalloc_node to kzalloc_node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 block/noop-iosched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
1.8.3.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux