diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-03-04 07:58:20 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-03-07 13:33:57 -0500 |
commit | ecb3403de1efb56f78d9093376aec0a8af76b316 (patch) | |
tree | 54f0c677d9ff10994b57ad3593241df0c4cbb987 | |
parent | d5929de8337fef46f3e307914ed0f3cb845e66c1 (diff) |
xfs: rename random32() to prandom_u32()
Use more preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: <bpm@sgi.com>
Cc: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>
Cc: xfs@oss.sgi.com
Signed-off-by: Ben Myers <bpm@sgi.com>
-rw-r--r-- | fs/xfs/xfs_alloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_error.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 0ad23253e8b1..a8beb5c7dd60 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -842,7 +842,7 @@ xfs_alloc_ag_vextent_near( | |||
842 | */ | 842 | */ |
843 | int dofirst; /* set to do first algorithm */ | 843 | int dofirst; /* set to do first algorithm */ |
844 | 844 | ||
845 | dofirst = random32() & 1; | 845 | dofirst = prandom_u32() & 1; |
846 | #endif | 846 | #endif |
847 | 847 | ||
848 | restart: | 848 | restart: |
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index 610456054dc2..07bf3b9815f5 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c | |||
@@ -66,7 +66,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression, | |||
66 | int i; | 66 | int i; |
67 | int64_t fsid; | 67 | int64_t fsid; |
68 | 68 | ||
69 | if (random32() % randfactor) | 69 | if (prandom_u32() % randfactor) |
70 | return 0; | 70 | return 0; |
71 | 71 | ||
72 | memcpy(&fsid, fsidp, sizeof(xfs_fsid_t)); | 72 | memcpy(&fsid, fsidp, sizeof(xfs_fsid_t)); |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 515bf71ce01c..ba626613bf49 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -369,7 +369,7 @@ xfs_ialloc_ag_alloc( | |||
369 | * number from being easily guessable. | 369 | * number from being easily guessable. |
370 | */ | 370 | */ |
371 | error = xfs_ialloc_inode_init(args.mp, tp, agno, args.agbno, | 371 | error = xfs_ialloc_inode_init(args.mp, tp, agno, args.agbno, |
372 | args.len, random32()); | 372 | args.len, prandom_u32()); |
373 | 373 | ||
374 | if (error) | 374 | if (error) |
375 | return error; | 375 | return error; |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index eec226f78a40..b345a7c85153 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -3485,7 +3485,7 @@ xlog_ticket_alloc( | |||
3485 | tic->t_curr_res = unit_bytes; | 3485 | tic->t_curr_res = unit_bytes; |
3486 | tic->t_cnt = cnt; | 3486 | tic->t_cnt = cnt; |
3487 | tic->t_ocnt = cnt; | 3487 | tic->t_ocnt = cnt; |
3488 | tic->t_tid = random32(); | 3488 | tic->t_tid = prandom_u32(); |
3489 | tic->t_clientid = client; | 3489 | tic->t_clientid = client; |
3490 | tic->t_flags = XLOG_TIC_INITED; | 3490 | tic->t_flags = XLOG_TIC_INITED; |
3491 | tic->t_trans_type = 0; | 3491 | tic->t_trans_type = 0; |