Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af8e2a4c authored by Nadia Derbey's avatar Nadia Derbey Committed by Linus Torvalds
Browse files

idr: fix idr_remove()



The return inside the loop makes us free only a single layer.

Signed-off-by: default avatarNadia Derbey <Nadia.Derbey@bull.net>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Jim Houston <jim.houston@comcast.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7793bfcf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -385,8 +385,8 @@ void idr_remove(struct idr *idp, int id)
	while (idp->id_free_cnt >= IDR_FREE_MAX) {
		p = alloc_layer(idp);
		kmem_cache_free(idr_layer_cache, p);
		return;
	}
	return;
}
EXPORT_SYMBOL(idr_remove);