Linux MM tree latest commits
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: imre.deak@nokia.com, eparis@redhat.com,
	paulmck@linux.vnet.ibm.com, stable@kernel.org, tj@kernel.org
Subject: + idr-fix-backtrack-logic-in-idr_remove_all-update.patch added to -mm tree
Date: Thu, 20 May 2010 14:41:25 -0700	[thread overview]
Message-ID: <201005202141.o4KLfPme006711@imap1.linux-foundation.org> (raw)


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@nokia.com>

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@nokia.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: <stable@kernel.org>		[2.6.34.1]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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@nokia.com are

idr-fix-backtrack-logic-in-idr_remove_all.patch
idr-fix-backtrack-logic-in-idr_remove_all-update.patch


                 reply	other threads:[~2010-05-20 21:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201005202141.o4KLfPme006711@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=imre.deak@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=stable@kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox