| To: | linux-kernel@xxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH -v2 12/26] xfs: rename random32() to prandom_u32() |
| From: | Akinobu Mita <akinobu.mita@xxxxxxxxx> |
| Date: | Thu, 3 Jan 2013 21:19:08 +0900 |
| Cc: | Akinobu Mita <akinobu.mita@xxxxxxxxx>, Ben Myers <bpm@xxxxxxx>, Alex Elder <elder@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=GQfejs6LxqMD8vOZyP3C1IfR6iPPP+hqNFZgM4U7tis=; b=noKNekYovx5dlNyRf5BmlSkx57mHMMB7q/P6FdBYN/CIfJwaDk+zXGbFZQ9tEJdey7 g7qLFkeg/MNBiNtuchZQbqrmVNIR4vt/U3PmwP77PTxL6Jdq30fJBT03ajXgMoE55I5P eLcMyW7fZ0aRJyC2c9fVI3fbWbXTLGm1n5xZOkT9/FA8mc6OdcnYyB+XvfcWCaHDK3s6 oFn4OaCoEjqbNvUIQavwN6ymsy7Qz7HyKkpqYbn2mUgdmaz6EIsn/ixkirefaF1XFI9a Z9c1uWwtSjAynTpRtAw4l2E/Pbl3XUzPBzMuneXHw6XI9qlz0bTeK5U2Vfrjo7vm2v6M WCqg== |
| In-reply-to: | <1357215562-6288-1-git-send-email-akinobu.mita@xxxxxxxxx> |
| References: | <1357215562-6288-1-git-send-email-akinobu.mita@xxxxxxxxx> |
Use more preferable function name which implies using a pseudo-random
number generator.
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: Ben Myers <bpm@xxxxxxx>
Cc: Alex Elder <elder@xxxxxxxxxx>
Cc: xfs@xxxxxxxxxxx
---
No change from v1
fs/xfs/xfs_alloc.c | 2 +-
fs/xfs/xfs_error.c | 2 +-
fs/xfs/xfs_ialloc.c | 2 +-
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 393055f..d2dd19d 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -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:
diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c
index 6104560..07bf3b9 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,
int i;
int64_t fsid;
- if (random32() % randfactor)
+ if (prandom_u32() % randfactor)
return 0;
memcpy(&fsid, fsidp, sizeof(xfs_fsid_t));
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index a815412..6c75865 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -373,7 +373,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;
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 46bd9d5..92e036b 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -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;
--
1.7.11.7
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: hole punching performance, Dave Chinner |
|---|---|
| Next by Date: | Re: xfsdump INTERRUPT issue, Jeffrey Ellis |
| Previous by Thread: | [XFS updates] XFS development tree branch, for-next, updated. for-linus-v3.8-rc1-13587-g56431cd, xfs |
| Next by Thread: | Re: [PATCH -v2 12/26] xfs: rename random32() to prandom_u32(), Ben Myers |
| Indexes: | [Date] [Thread] [Top] [All Lists] |