Added some debug printk's for shares_write problems that Steve is seeing
[linux-2.6.git] / lib / radix-tree.c
index 1d0a884..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 */
                }
@@ -799,9 +799,7 @@ void __init radix_tree_init(void)
 {
        radix_tree_node_cachep = kmem_cache_create("radix_tree_node",
                        sizeof(struct radix_tree_node), 0,
-                       0, radix_tree_node_ctor, NULL);
-       if (!radix_tree_node_cachep)
-               panic ("Failed to create radix_tree_node cache\n");
+                       SLAB_PANIC, radix_tree_node_ctor, NULL);
        radix_tree_init_maxindex();
        hotcpu_notifier(radix_tree_callback, 0);
 }