summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/ufs/ffs/ffs_alloc.c')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 3be3f2f..3483b56 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_alloc.c 8.18 (Berkeley) 5/26/95
- * $Id: ffs_alloc.c,v 1.31 1997/03/09 06:00:40 mpp Exp $
+ * $Id: ffs_alloc.c,v 1.32 1997/03/22 06:53:28 bde Exp $
*/
#include "opt_quota.h"
@@ -55,8 +55,6 @@
#include <ufs/ffs/fs.h>
#include <ufs/ffs/ffs_extern.h>
-extern u_long nextgennumber;
-
typedef ufs_daddr_t allocfcn_t __P((struct inode *ip, int cg, ufs_daddr_t bpref,
int size));
@@ -601,9 +599,8 @@ ffs_valloc(ap)
/*
* Set up a new generation number for this inode.
*/
- if (++nextgennumber < (u_long)time.tv_sec)
- nextgennumber = time.tv_sec;
- ip->i_gen = nextgennumber;
+ if (ip->i_gen == 0 || ++(ip->i_gen) == 0)
+ ip->i_gen = random() / 2 + 1;
return (0);
noinodes:
ffs_fserr(fs, ap->a_cred->cr_uid, "out of inodes");
OpenPOWER on IntegriCloud