mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
ext2fs: Use the complete random() range in i_gen.
i_gen is unsigned in ext2fs so we can handle the complete 32 bits. MFC after: 1 week
This commit is contained in:
parent
94addbe133
commit
e2bc2ccec0
1 changed files with 1 additions and 1 deletions
|
|
@ -979,7 +979,7 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
|
|||
* already have one. This should only happen on old filesystems.
|
||||
*/
|
||||
if (ip->i_gen == 0) {
|
||||
ip->i_gen = random() / 2 + 1;
|
||||
ip->i_gen = random() + 1;
|
||||
if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0)
|
||||
ip->i_flag |= IN_MODIFIED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue