]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - lib/sbitmap.c
sbitmap: don't update the allocation hint on clear after resize
[linux.git] / lib / sbitmap.c
index f736c52a712c060e8ec41f3b00392267f5b9f88a..e408089215445c2d590960b4e4e10a0040ab9864 100644 (file)
@@ -321,7 +321,7 @@ void sbitmap_queue_clear(struct sbitmap_queue *sbq, unsigned int nr,
 {
        sbitmap_clear_bit(&sbq->sb, nr);
        sbq_wake_up(sbq);
-       if (likely(!sbq->round_robin))
+       if (likely(!sbq->round_robin && nr < sbq->sb.depth))
                *per_cpu_ptr(sbq->alloc_hint, cpu) = nr;
 }
 EXPORT_SYMBOL_GPL(sbitmap_queue_clear);