The new function is required because the bitmaps (vdi_inuse and
vdi_deleted) can be cleared now.

Cc: Saeki Masaki <[email protected]>
Cc: Yuka Kawasaki <[email protected]>
Signed-off-by: Hitoshi Mitake <[email protected]>
---
 include/bitops.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/bitops.h b/include/bitops.h
index 86a8ac1..6b605fb 100644
--- a/include/bitops.h
+++ b/include/bitops.h
@@ -146,6 +146,11 @@ static inline void atomic_set_bit(int nr, unsigned long 
*addr)
        uatomic_or(addr + nr / BITS_PER_LONG, 1UL << (nr % BITS_PER_LONG));
 }
 
+static inline void atomic_clear_bit(int nr, unsigned long *addr)
+{
+       uatomic_and(addr + nr / BITS_PER_LONG, ~(1UL << (nr % BITS_PER_LONG)));
+}
+
 static inline int test_bit(unsigned int nr, const unsigned long *addr)
 {
        return ((1UL << (nr % BITS_PER_LONG)) &
-- 
1.8.3.2

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to