summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2016-04-14 01:24:00 +0000
committerKevin Lo <kevlo@FreeBSD.org>2016-04-14 01:24:00 +0000
commit0e7677cf3e6b49f2713981ed5574236b1f88c2d9 (patch)
tree811c70437bca7cf5d9565380003093cb880f481f
parent1298b507b3da16434d6788e36c5bcc35ca046365 (diff)
Notes
-rw-r--r--sys/fs/ext2fs/ext2_alloc.c4
-rw-r--r--sys/fs/ext2fs/ext2_vfsops.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c
index 2bf77723ef8f..448b0512897a 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;
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index fab98a5945f8..a1f3c514b242 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -308,8 +308,8 @@ ext2_check_sb_compat(struct ext2fs *es, struct cdev *dev, int ronly)
}
/*
- * This computes the fields of the ext2_sb_info structure from the
- * data in the ext2_super_block structure read in.
+ * This computes the fields of the m_ext2fs structure from the
+ * data in the ext2fs structure read in.
*/
static int
compute_sb_data(struct vnode *devvp, struct ext2fs *es,
@@ -600,7 +600,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp)
/*
* I don't know whether this is the right strategy. Note that
- * we dynamically allocate both an ext2_sb_info and an ext2_super_block
+ * we dynamically allocate both an m_ext2fs and an ext2fs
* while Linux keeps the super block in a locked buffer.
*/
ump->um_e2fs = malloc(sizeof(struct m_ext2fs),