[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180524211135.27760-4-dave@stgolabs.net>
Date: Thu, 24 May 2018 14:11:32 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: akpm@...ux-foundation.org, torvalds@...ux-foundation.org
Cc: tgraf@...g.ch, herbert@...dor.apana.org.au,
manfred@...orfullife.com, guillaume.knispel@...ersonicimagine.com,
linux-api@...r.kernel.org, linux-kernel@...r.kernel.org,
Davidlohr Bueso <dave@...olabs.net>,
Davidlohr Bueso <dbueso@...e.de>
Subject: [PATCH 3/6] lib/bucket_locks: use kvmalloc_array()
For some reason we don't use this call, but we rely just
fine on kmalloc_array(). Make both consistent.
Signed-off-by: Davidlohr Bueso <dbueso@...e.de>
---
lib/bucket_locks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bucket_locks.c b/lib/bucket_locks.c
index 266a97c5708b..75fe7386756f 100644
--- a/lib/bucket_locks.c
+++ b/lib/bucket_locks.c
@@ -31,7 +31,7 @@ int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *locks_mask,
if (sizeof(spinlock_t) != 0) {
if (gfpflags_allow_blocking(gfp))
- tlocks = kvmalloc(size * sizeof(spinlock_t), gfp);
+ tlocks = kvmalloc_array(size, sizeof(spinlock_t), gfp);
else
tlocks = kmalloc_array(size, sizeof(spinlock_t), gfp);
if (!tlocks)
--
2.13.6
Powered by blists - more mailing lists