The patch titled idr-fix-backtrack-logic-in-idr_remove_all-update has been added to the -mm tree. Its filename is idr-fix-backtrack-logic-in-idr_remove_all-update.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: idr-fix-backtrack-logic-in-idr_remove_all-update From: Imre Deak <imre.deak@xxxxxxxxx> Changes since v1: - changed nand to xor to save an instruction - add note on how we calculate the backtrack level Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> Reviewed-by: Tejun Heo <tj@xxxxxxxxxx> Cc: Eric Paris <eparis@xxxxxxxxxx> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxx> [2.6.34.1] Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/idr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN lib/idr.c~idr-fix-backtrack-logic-in-idr_remove_all-update lib/idr.c --- a/lib/idr.c~idr-fix-backtrack-logic-in-idr_remove_all-update +++ a/lib/idr.c @@ -465,7 +465,8 @@ void idr_remove_all(struct idr *idp) bt_mask = id; id += 1 << n; - while (n < fls(id & ~bt_mask)) { + /* Get the highest bit that the above add changed from 0->1. */ + while (n < fls(id ^ bt_mask)) { if (p) free_layer(p); n += IDR_BITS; _ Patches currently in -mm which might be from imre.deak@xxxxxxxxx are idr-fix-backtrack-logic-in-idr_remove_all.patch idr-fix-backtrack-logic-in-idr_remove_all-update.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html