diff options
Diffstat (limited to 'ext2fs/bitmap.c')
-rw-r--r-- | ext2fs/bitmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext2fs/bitmap.c b/ext2fs/bitmap.c index e512d011..92850232 100644 --- a/ext2fs/bitmap.c +++ b/ext2fs/bitmap.c @@ -91,6 +91,8 @@ find_next_zero_bit(void *addr, unsigned long size, unsigned long offset) found_first: tmp |= ~0UL << size; + if (!~tmp) + return result + size; found_middle: return result + ffz(tmp); } |