+static inline void CFS_RESET_BITMAP(struct cfs_bitmap *bitmap)
+{
+ if (bitmap->size > 0) {
+ int nbits = bitmap->size;
+
+ memset(bitmap, 0, CFS_BITMAP_SIZE(nbits));
+ bitmap->size = nbits;
+ }
+}
+
+#define CFS_FREE_BITMAP(ptr) LIBCFS_FREE(ptr, CFS_BITMAP_SIZE(ptr->size))