xfs: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 4 Mar 2013 12:58:20 +0000 (21:58 +0900)
committerBen Myers <bpm@sgi.com>
Thu, 7 Mar 2013 18:33:57 +0000 (12:33 -0600)
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>
fs/xfs/xfs_alloc.c
fs/xfs/xfs_error.c
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_log.c

index 0ad23253e8b1ed1da6c723b44d828fbb7e743350..a8beb5c7dd60e2d7b8b114fd0827ec27f37230ab 100644 (file)
@@ -842,7 +842,7 @@ xfs_alloc_ag_vextent_near(
         */
        int             dofirst;        /* set to do first algorithm */
 
-       dofirst = random32() & 1;
+       dofirst = prandom_u32() & 1;
 #endif
 
 restart:
index 610456054dc288e66510ed9e29ae2c2d5f26fb9e..07bf3b9815f50307b1db79060540bf92e5a7c130 100644 (file)
@@ -66,7 +66,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
        int i;
        int64_t fsid;
 
-       if (random32() % randfactor)
+       if (prandom_u32() % randfactor)
                return 0;
 
        memcpy(&fsid, fsidp, sizeof(xfs_fsid_t));
index 515bf71ce01ce790e0bab557384a0dfb07c3544a..ba626613bf492399bcd64753fbfb4d46e9713aa2 100644 (file)
@@ -369,7 +369,7 @@ xfs_ialloc_ag_alloc(
         * number from being easily guessable.
         */
        error = xfs_ialloc_inode_init(args.mp, tp, agno, args.agbno,
-                       args.len, random32());
+                       args.len, prandom_u32());
 
        if (error)
                return error;
index eec226f78a4060f053235399952db73778da8afa..b345a7c85153dda82825050a8d1234ed4c73c541 100644 (file)
@@ -3485,7 +3485,7 @@ xlog_ticket_alloc(
        tic->t_curr_res         = unit_bytes;
        tic->t_cnt              = cnt;
        tic->t_ocnt             = cnt;
-       tic->t_tid              = random32();
+       tic->t_tid              = prandom_u32();
        tic->t_clientid         = client;
        tic->t_flags            = XLOG_TIC_INITED;
        tic->t_trans_type       = 0;