Skip to content

Commit dec615f

Browse files
committed
Merge branch 'for-7.1/block' into for-next
* for-7.1/block: drbd: use get_random_u64() where appropriate
2 parents 0b581d2 + fa0cac9 commit dec615f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/block/drbd/drbd_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ void drbd_gen_and_send_sync_uuid(struct drbd_peer_device *peer_device)
874874
if (uuid && uuid != UUID_JUST_CREATED)
875875
uuid = uuid + UUID_NEW_BM_OFFSET;
876876
else
877-
get_random_bytes(&uuid, sizeof(u64));
877+
uuid = get_random_u64();
878878
drbd_uuid_set(device, UI_BITMAP, uuid);
879879
drbd_print_uuids(device, "updated sync UUID");
880880
drbd_md_sync(device);
@@ -3337,7 +3337,7 @@ void drbd_uuid_new_current(struct drbd_device *device) __must_hold(local)
33373337
u64 val;
33383338
unsigned long long bm_uuid;
33393339

3340-
get_random_bytes(&val, sizeof(u64));
3340+
val = get_random_u64();
33413341

33423342
spin_lock_irq(&device->ldev->md.uuid_lock);
33433343
bm_uuid = device->ldev->md.uuid[UI_BITMAP];

drivers/block/drbd/drbd_nl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3236,7 +3236,7 @@ int drbd_adm_resume_io(struct sk_buff *skb, struct genl_info *info)
32363236
* matching real data uuid exists).
32373237
*/
32383238
u64 val;
3239-
get_random_bytes(&val, sizeof(u64));
3239+
val = get_random_u64();
32403240
drbd_set_ed_uuid(device, val);
32413241
drbd_warn(device, "Resumed without access to data; please tear down before attempting to re-configure.\n");
32423242
}

0 commit comments

Comments
 (0)