diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-05-06 10:15:01 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-05-06 10:15:01 -0400 |
commit | be74417553f4b2ee46be2088007a674ef2f02330 (patch) | |
tree | f3c3e0f3d15b2c638699f3c8305a090c88e16c8b /fs/btrfs/bit-radix.c | |
parent | be08c1b9f8e679d45e086728445ac36cf250e92e (diff) | |
download | op-kernel-dev-be74417553f4b2ee46be2088007a674ef2f02330.zip op-kernel-dev-be74417553f4b2ee46be2088007a674ef2f02330.tar.gz |
Btrfs: more allocator enhancements
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/bit-radix.c')
-rw-r--r-- | fs/btrfs/bit-radix.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/bit-radix.c b/fs/btrfs/bit-radix.c index e9ace32..1a02714 100644 --- a/fs/btrfs/bit-radix.c +++ b/fs/btrfs/bit-radix.c @@ -26,8 +26,10 @@ int set_radix_bit(struct radix_tree_root *radix, unsigned long bit) if (ret) return ret; } - set_bit(bit_slot, bits + 1); - return 0; + ret = test_and_set_bit(bit_slot, bits + 1); + if (ret < 0) + ret = 1; + return ret; } int test_radix_bit(struct radix_tree_root *radix, unsigned long bit) |