*/
        unsigned int map_nr;
 
+       /**
+        * @round_robin: Allocate bits in strict round-robin order.
+        */
+       bool round_robin;
+
        /**
         * @map: Allocated bitmap.
         */
         */
        atomic_t ws_active;
 
-       /**
-        * @round_robin: Allocate bits in strict round-robin order.
-        */
-       bool round_robin;
-
        /**
         * @min_shallow_depth: The minimum shallow depth which may be passed to
         * sbitmap_queue_get_shallow() or __sbitmap_queue_get_shallow().
  *         given, a good default is chosen.
  * @flags: Allocation flags.
  * @node: Memory node to allocate on.
+ * @round_robin: If true, be stricter about allocation order; always allocate
+ *               starting from the last allocated bit. This is less efficient
+ *               than the default behavior (false).
  *
  * Return: Zero on success or negative errno on failure.
  */
 int sbitmap_init_node(struct sbitmap *sb, unsigned int depth, int shift,
-                     gfp_t flags, int node);
+                     gfp_t flags, int node, bool round_robin);
 
 /**
  * sbitmap_free() - Free memory used by a &struct sbitmap.
  * sbitmap_get() - Try to allocate a free bit from a &struct sbitmap.
  * @sb: Bitmap to allocate from.
  * @alloc_hint: Hint for where to start searching for a free bit.
- * @round_robin: If true, be stricter about allocation order; always allocate
- *               starting from the last allocated bit. This is less efficient
- *               than the default behavior (false).
  *
  * This operation provides acquire barrier semantics if it succeeds.
  *
  * Return: Non-negative allocated bit number if successful, -1 otherwise.
  */
-int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin);
+int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint);
 
 /**
  * sbitmap_get_shallow() - Try to allocate a free bit from a &struct sbitmap,
 
 }
 
 int sbitmap_init_node(struct sbitmap *sb, unsigned int depth, int shift,
-                     gfp_t flags, int node)
+                     gfp_t flags, int node, bool round_robin)
 {
        unsigned int bits_per_word;
        unsigned int i;
        sb->shift = shift;
        sb->depth = depth;
        sb->map_nr = DIV_ROUND_UP(sb->depth, bits_per_word);
+       sb->round_robin = round_robin;
 
        if (depth == 0) {
                sb->map = NULL;
 }
 
 static int sbitmap_find_bit_in_index(struct sbitmap *sb, int index,
-                                    unsigned int alloc_hint, bool round_robin)
+                                    unsigned int alloc_hint)
 {
        struct sbitmap_word *map = &sb->map[index];
        int nr;
 
        do {
                nr = __sbitmap_get_word(&map->word, map->depth, alloc_hint,
-                                       !round_robin);
+                                       !sb->round_robin);
                if (nr != -1)
                        break;
                if (!sbitmap_deferred_clear(map))
        return nr;
 }
 
-int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin)
+int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint)
 {
        unsigned int i, index;
        int nr = -1;
         * alloc_hint to find the right word index. No point in looping
         * twice in find_next_zero_bit() for that case.
         */
-       if (round_robin)
+       if (sb->round_robin)
                alloc_hint = SB_NR_TO_BIT(sb, alloc_hint);
        else
                alloc_hint = 0;
 
        for (i = 0; i < sb->map_nr; i++) {
-               nr = sbitmap_find_bit_in_index(sb, index, alloc_hint,
-                                               round_robin);
+               nr = sbitmap_find_bit_in_index(sb, index, alloc_hint);
                if (nr != -1) {
                        nr += index << sb->shift;
                        break;
        int ret;
        int i;
 
-       ret = sbitmap_init_node(&sbq->sb, depth, shift, flags, node);
+       ret = sbitmap_init_node(&sbq->sb, depth, shift, flags, node,
+                               round_robin);
        if (ret)
                return ret;
 
                atomic_set(&sbq->ws[i].wait_cnt, sbq->wake_batch);
        }
 
-       sbq->round_robin = round_robin;
        return 0;
 }
 EXPORT_SYMBOL_GPL(sbitmap_queue_init_node);
                hint = depth ? prandom_u32() % depth : 0;
                this_cpu_write(*sbq->alloc_hint, hint);
        }
-       nr = sbitmap_get(&sbq->sb, hint, sbq->round_robin);
+       nr = sbitmap_get(&sbq->sb, hint);
 
        if (nr == -1) {
                /* If the map is full, a hint won't do us much good. */
                this_cpu_write(*sbq->alloc_hint, 0);
-       } else if (nr == hint || unlikely(sbq->round_robin)) {
+       } else if (nr == hint || unlikely(sbq->sb.round_robin)) {
                /* Only update the hint if we used it. */
                hint = nr + 1;
                if (hint >= depth - 1)
        if (nr == -1) {
                /* If the map is full, a hint won't do us much good. */
                this_cpu_write(*sbq->alloc_hint, 0);
-       } else if (nr == hint || unlikely(sbq->round_robin)) {
+       } else if (nr == hint || unlikely(sbq->sb.round_robin)) {
                /* Only update the hint if we used it. */
                hint = nr + 1;
                if (hint >= depth - 1)
        smp_mb__after_atomic();
        sbitmap_queue_wake_up(sbq);
 
-       if (likely(!sbq->round_robin && nr < sbq->sb.depth))
+       if (likely(!sbq->sb.round_robin && nr < sbq->sb.depth))
                *per_cpu_ptr(sbq->alloc_hint, cpu) = nr;
 }
 EXPORT_SYMBOL_GPL(sbitmap_queue_clear);
        }
        seq_puts(m, "}\n");
 
-       seq_printf(m, "round_robin=%d\n", sbq->round_robin);
+       seq_printf(m, "round_robin=%d\n", sbq->sb.round_robin);
        seq_printf(m, "min_shallow_depth=%u\n", sbq->min_shallow_depth);
 }
 EXPORT_SYMBOL_GPL(sbitmap_queue_show);