[PATCH 3/5] md/linear: make memory allocation from md's numa node

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

 



linear has the same context as md does, so there is no need
to add a module parameter. Just inherit it from md.

Signed-off-by: Zhengyuan Liu <liuzhengyuan@xxxxxxxxxx>
---
 drivers/md/linear.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 5f1eb91..43ea6eb 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -96,8 +96,8 @@ static struct linear_conf *linear_conf(struct mddev *mddev, int raid_disks)
 	int i, cnt;
 	bool discard_supported = false;
 
-	conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(struct dev_info),
-			GFP_KERNEL);
+	conf = kzalloc_node(sizeof (*conf) + raid_disks*sizeof(struct dev_info),
+			GFP_KERNEL, mddev->numa_node_id);
 	if (!conf)
 		return NULL;
 
-- 
2.7.4



--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux