]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - lib/find_bit.c
scsi: iscsi: Fix a potential deadlock in the timeout handler
[mirror_ubuntu-hirsute-kernel.git] / lib / find_bit.c
index 5c51eb45178a9da5d6073bc711b12b6d0c9392f5..e35a76b291e69e812faa266a30282a248b43d5d3 100644 (file)
@@ -214,3 +214,17 @@ EXPORT_SYMBOL(find_next_bit_le);
 #endif
 
 #endif /* __BIG_ENDIAN */
+
+unsigned long find_next_clump8(unsigned long *clump, const unsigned long *addr,
+                              unsigned long size, unsigned long offset)
+{
+       offset = find_next_bit(addr, size, offset);
+       if (offset == size)
+               return size;
+
+       offset = round_down(offset, 8);
+       *clump = bitmap_get_value8(addr, offset);
+
+       return offset;
+}
+EXPORT_SYMBOL(find_next_clump8);