bitmap: relax find_nth_bit() limitation on return value
[linux-block.git] / lib / find_bit.c
index 32f99e9a670e64fcdc8e9a7e67d29df199486a69..0bddfc3ff248349b7459e6b9ce55b004300f6d7a 100644 (file)
@@ -87,7 +87,7 @@ out:                                                                          \
        if (sz % BITS_PER_LONG)                                                 \
                tmp = (FETCH) & BITMAP_LAST_WORD_MASK(sz);                      \
 found:                                                                         \
-       sz = min(idx * BITS_PER_LONG + fns(tmp, nr), sz);                       \
+       sz = idx * BITS_PER_LONG + fns(tmp, nr);                                \
 out:                                                                           \
        sz;                                                                     \
 })