VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / lib / radix-tree.c
index 8938227..a0a0902 100644 (file)
@@ -485,8 +485,8 @@ __lookup(struct radix_tree_root *root, void **results, unsigned long index,
                for ( ; i < RADIX_TREE_MAP_SIZE; i++) {
                        if (slot->slots[i] != NULL)
                                break;
-                       index &= ~((1 << shift) - 1);
-                       index += 1 << shift;
+                       index &= ~((1UL << shift) - 1);
+                       index += 1UL << shift;
                        if (index == 0)
                                goto out;       /* 32-bit wraparound */
                }
@@ -575,8 +575,8 @@ __lookup_tag(struct radix_tree_root *root, void **results, unsigned long index,
                                BUG_ON(slot->slots[i] == NULL);
                                break;
                        }
-                       index &= ~((1 << shift) - 1);
-                       index += 1 << shift;
+                       index &= ~((1UL << shift) - 1);
+                       index += 1UL << shift;
                        if (index == 0)
                                goto out;       /* 32-bit wraparound */
                }