[folded-merged] radix-tree-rewrite-radix_tree_locate_item-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: radix-tree: rewrite radix_tree_locate_item fix
has been removed from the -mm tree.  Its filename was
     radix-tree-rewrite-radix_tree_locate_item-fix.patch

This patch was dropped because it was folded into radix-tree-rewrite-radix_tree_locate_item.patch

------------------------------------------------------
From: Hugh Dickins <hughd@xxxxxxxxxx>
Subject: radix-tree: rewrite radix_tree_locate_item fix

radix_tree_locate_item() is often returning the wrong index, causing
swapoff of shmem to hang because it cannot find the swap entry there.
__locate()'s use of base is bogus, it adds an offset twice into index.

Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1605012108490.1166@eggly.anvils
Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxxxx>
Reviewed-by: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/radix-tree.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -puN lib/radix-tree.c~radix-tree-rewrite-radix_tree_locate_item-fix lib/radix-tree.c
--- a/lib/radix-tree.c~radix-tree-rewrite-radix_tree_locate_item-fix
+++ a/lib/radix-tree.c
@@ -1315,18 +1315,17 @@ static unsigned long __locate(struct rad
 			      unsigned long index, struct locate_info *info)
 {
 	unsigned int shift, height;
-	unsigned long base, i;
+	unsigned long i;
 
 	height = slot->path & RADIX_TREE_HEIGHT_MASK;
 	shift = height * RADIX_TREE_MAP_SHIFT;
 
 	do {
 		shift -= RADIX_TREE_MAP_SHIFT;
-		base = index & ~((1UL << shift) - 1);
 
 		for (i = (index >> shift) & RADIX_TREE_MAP_MASK;
 		     i < RADIX_TREE_MAP_SIZE;
-		     i++, index = base + (i << shift)) {
+		     i++, index += (1UL << shift)) {
 			struct radix_tree_node *node =
 					rcu_dereference_raw(slot->slots[i]);
 			if (node == RADIX_TREE_RETRY)
_

Patches currently in -mm which might be from hughd@xxxxxxxxxx are

radix-tree-rewrite-radix_tree_locate_item.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



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux