diff options
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 e9ace32d7bae..1a0271445dfb 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) | |||
26 | if (ret) | 26 | if (ret) |
27 | return ret; | 27 | return ret; |
28 | } | 28 | } |
29 | set_bit(bit_slot, bits + 1); | 29 | ret = test_and_set_bit(bit_slot, bits + 1); |
30 | return 0; | 30 | if (ret < 0) |
31 | ret = 1; | ||
32 | return ret; | ||
31 | } | 33 | } |
32 | 34 | ||
33 | int test_radix_bit(struct radix_tree_root *radix, unsigned long bit) | 35 | int test_radix_bit(struct radix_tree_root *radix, unsigned long bit) |