[DRBD-cvs] svn commit by phil - r2768 - trunk/drbd - Do not use kzalloc() on older 2.6.x kernels. We should

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Feb 27 17:28:38 CET 2007


Author: phil
Date: 2007-02-27 17:28:36 +0100 (Tue, 27 Feb 2007)
New Revision: 2768

Modified:
   trunk/drbd/drbd_actlog.c
Log:
Do not use kzalloc() on older 2.6.x kernels.
We should have an abstraction of this later, but for now this
is the quick fix.


Modified: trunk/drbd/drbd_actlog.c
===================================================================
--- trunk/drbd/drbd_actlog.c	2007-02-26 16:43:57 UTC (rev 2767)
+++ trunk/drbd/drbd_actlog.c	2007-02-27 16:28:36 UTC (rev 2768)
@@ -649,8 +649,10 @@
 	unsigned int page_offset=PAGE_SIZE;
 	struct drbd_atodb_wait wc;
 
-	bios = kzalloc(sizeof(struct bio*) * mdev->act_log->nr_elements,
+	bios = kmalloc(sizeof(struct bio*) * mdev->act_log->nr_elements,
 		       GFP_KERNEL);
+	memset(bios,0,sizeof(struct bio*) * mdev->act_log->nr_elements);
+
 	if(!bios) {
 		drbd_al_to_on_disk_bm_slow(mdev);
 		return;



More information about the drbd-cvs mailing list