* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
RETURN(ptr);
}
+static inline void CFS_RESET_BITMAP(cfs_bitmap_t *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))
static inline