The cfs_get_random_bytes() interface adds nothing of value
to get_random_byte() (which it uses internally). So just use the
standard interface.
Linux-commit:
e904f839cdb04d1b314753a83a6e58146e315c66
Change-Id: I48e153d7658f0f616afe4e884faeb09c2dbdcd03
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/35234
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
cfs_atomic_sub_and_test||atomic_sub_and_test
cfs_atomic_sub_return||atomic_sub_return
cfs_atomic_t||atomic_t
+cfs_get_random_bytes/get_random_bytes
cfs_hash_bd_t||struct cfs_hash_bd
cfs_hash_bucket_t||struct cfs_hash_bucket
cfs_hash_cond_arg_t||struct cfs_hash_cond_arg
if (lo->ldo_layout_gen > (LCME_ID_MAX >> 1)) {
__u32 layout_version;
- cfs_get_random_bytes(&layout_version, sizeof(layout_version));
+ get_random_bytes(&layout_version, sizeof(layout_version));
lo->ldo_layout_gen = layout_version & 0xffff;
}
#define DEBUG_SUBSYSTEM S_CLASS
+#include <linux/random.h>
+
#include <obd_support.h>
#include <lustre_handles.h>
#include <lustre_lib.h>
spin_lock_init(&bucket->lock);
}
- cfs_get_random_bytes(&handle_base, sizeof(handle_base));
+ get_random_bytes(&handle_base, sizeof(handle_base));
LASSERT(handle_base != 0ULL);
return 0;
#define DEBUG_SUBSYSTEM S_RPC
#include <linux/delay.h>
+#include <linux/random.h>
+
#include <obd_support.h>
#include <obd_class.h>
#include <lustre_lib.h>
spin_lock_init(&ptlrpc_last_xid_lock);
if (now < YEAR_2004) {
- cfs_get_random_bytes(&ptlrpc_last_xid, sizeof(ptlrpc_last_xid));
+ get_random_bytes(&ptlrpc_last_xid, sizeof(ptlrpc_last_xid));
ptlrpc_last_xid >>= 2;
ptlrpc_last_xid |= (1ULL << 61);
} else {
#define DEBUG_SUBSYSTEM S_SEC
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/random.h>
#include <linux/slab.h>
#include <linux/crypto.h>
#include <linux/mutex.h>
fill_krb5_header(kctx, khdr, 1);
/* generate confounder */
- cfs_get_random_bytes(conf, ke->ke_conf_size);
+ get_random_bytes(conf, ke->ke_conf_size);
/* get encryption blocksize. note kc_keye might not associated with
* a tfm, currently only for arcfour-hmac */
fill_krb5_header(kctx, khdr, 1);
/* generate confounder */
- cfs_get_random_bytes(conf, ke->ke_conf_size);
+ get_random_bytes(conf, ke->ke_conf_size);
/* get encryption blocksize. note kc_keye might not associated with
* a tfm, currently only for arcfour-hmac */
#include <linux/types.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/random.h>
#include <linux/slab.h>
#include <linux/hash.h>
#include <linux/mutex.h>
* sequence number checking, thus no chance to sent error notification
* back to clients.
*/
- cfs_get_random_bytes(&__ctx_index, sizeof(__ctx_index));
+ get_random_bytes(&__ctx_index, sizeof(__ctx_index));
rc = _cache_register_net(&rsi_cache, &init_net);
if (rc != 0)