From 461d1f1c9415bc456fcbadfe60be021b58e9ea1f Mon Sep 17 00:00:00 2001 From: mckusick Date: Fri, 6 Dec 2002 02:08:46 +0000 Subject: More tightly verify the preference returned for the new inode. Submitted by: Kris Kennaway Sponsored by: DARPA & NAI Labs. Approved by: re --- sys/ufs/ffs/ffs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 2b58167..b8921b4 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -841,7 +841,7 @@ ffs_valloc(pvp, mode, cred, vpp) ipref = ffs_dirpref(pip); else ipref = pip->i_number; - if (ipref >= fs->fs_ncg * fs->fs_ipg) + if ((unsigned)ipref >= fs->fs_ncg * fs->fs_ipg) ipref = 0; cg = ino_to_cg(fs, ipref); /* -- cgit v1.1