aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sbitmap.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-09-17 04:28:22 -0400
committerJens Axboe <axboe@fb.com>2016-09-17 10:39:08 -0400
commit48e28166a7b608e19a6aea3acadd81cdfe660f6b (patch)
treeece76660b963252e9371c8aea0a4d04f8b69c42f /lib/sbitmap.c
parent88459642cba452630326b9cab1c651e09577d4e4 (diff)
sbitmap: allocate wait queues on a specific node
The original bt_alloc() we converted from was using kzalloc(), not kzalloc_node(), to allocate the wait queues. This was probably an oversight, so fix it for sbitmap_queue_init_node(). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib/sbitmap.c')
-rw-r--r--lib/sbitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbitmap.c b/lib/sbitmap.c
index dfc084ac6937..4d8e97e470ee 100644
--- a/lib/sbitmap.c
+++ b/lib/sbitmap.c
@@ -208,7 +208,7 @@ int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth,
208 sbq->wake_batch = sbq_calc_wake_batch(depth); 208 sbq->wake_batch = sbq_calc_wake_batch(depth);
209 atomic_set(&sbq->wake_index, 0); 209 atomic_set(&sbq->wake_index, 0);
210 210
211 sbq->ws = kzalloc(SBQ_WAIT_QUEUES * sizeof(*sbq->ws), flags); 211 sbq->ws = kzalloc_node(SBQ_WAIT_QUEUES * sizeof(*sbq->ws), flags, node);
212 if (!sbq->ws) { 212 if (!sbq->ws) {
213 sbitmap_free(&sbq->sb); 213 sbitmap_free(&sbq->sb);
214 return -ENOMEM; 214 return -ENOMEM;