summaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2016-04-01 03:21:01 +0000
committerKevin Lo <kevlo@FreeBSD.org>2016-04-01 03:21:01 +0000
commitdf04a188af6a41719f8c028e702c9c5374b451e4 (patch)
treeab007f685e9b3da340fc8a8b8a160b18315a92fc /sys/fs
parent2b5554fec057a7543311630667a922ebb30aa6ff (diff)
downloadsrc-test2-df04a188af6a41719f8c028e702c9c5374b451e4.tar.gz
src-test2-df04a188af6a41719f8c028e702c9c5374b451e4.zip
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/ext2fs/ext2_alloc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c
index 12067d2a9b2a..9d5417c1a5de 100644
--- a/sys/fs/ext2fs/ext2_alloc.c
+++ b/sys/fs/ext2fs/ext2_alloc.c
@@ -406,10 +406,8 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp)
/*
* Set up a new generation number for this inode.
- * XXX check if this makes sense in ext2
*/
- if (ip->i_gen == 0 || ++ip->i_gen == 0)
- ip->i_gen = random() / 2 + 1;
+ ip->i_gen = arc4random();
vfs_timestamp(&ts);
ip->i_birthtime = ts.tv_sec;