*/
#ifdef __KERNEL__
#include <linux/module.h>
-#include <linux/random.h>
#else
#include <liblustre.h>
#endif
size_t size, const char *file, int line)
{
if (ptr == NULL ||
- (ll_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) {
+ (cfs_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) {
CERROR("%s%salloc of %s ("LPU64" bytes) failed at %s:%d\n",
ptr ? "force " :"", type, name, (__u64)size, file,
line);
/* Fail 1/obd_fail_val times */
if (obd_fail_loc & OBD_FAIL_RAND) {
- if (obd_fail_val < 2 || ll_rand() % obd_fail_val > 0)
+ if (obd_fail_val < 2 || cfs_rand() % obd_fail_val > 0)
return 0;
}