32 bit compile fixes
authorChris Mason <chris.mason@oracle.com>
Fri, 8 Jun 2007 12:44:41 +0000 (08:44 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Fri, 8 Jun 2007 12:44:41 +0000 (08:44 -0400)
bit-radix.c
extent-tree.c

index cd9928a3b6d5787ab332689677f8e5f076d375f5..7509b31a5a5f946c7fb113b98efe435a2a996416 100644 (file)
@@ -88,7 +88,7 @@ static unsigned long __ffs(unsigned long word)
 
        if (sizeof(long) == 8 && (word & 0xffffffff) == 0) {
                num += 32;
-               word >>= 32;
+               word >>= sizeof(long) * 4;
        }
        if ((word & 0xffff) == 0) {
                num += 16;
index 82952ef9c6056d0245c97a89145d3153d813a508..5b3c3da42824f0314289d3d0ee8ddcfbec63b83a 100644 (file)
@@ -299,9 +299,10 @@ static int __free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
                u64 super_blocks_used;
                if (pin) {
                        int err;
+                       unsigned long bl = blocknr;
                        radix_tree_preload(GFP_KERNEL);
                        err = radix_tree_insert(&info->pinned_radix,
-                                               blocknr, (void *)blocknr);
+                                               blocknr, (void *)bl);
                        BUG_ON(err);
                        radix_tree_preload_end();
                }