diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-07-06 05:24:17 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-07-06 05:24:17 +0000 |
commit | 2d3af5cb0a41033cc670bfe6c6f9a6f0e3af190a (patch) | |
tree | 84200dd4f3437ab0d16b95c29c1aa71d54e5e411 /sys/ufs/ext2fs/ext2fs_alloc.c | |
parent | 3079d63cbe67d9b57184ba7b25b221b4dd502643 (diff) |
fix off by one. inodes start at 1, so e2fs_icount is a valid inode number.
from otto moerbeek
Diffstat (limited to 'sys/ufs/ext2fs/ext2fs_alloc.c')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_alloc.c b/sys/ufs/ext2fs/ext2fs_alloc.c index 94f585c05d3..6f1347817ef 100644 --- a/sys/ufs/ext2fs/ext2fs_alloc.c +++ b/sys/ufs/ext2fs/ext2fs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_alloc.c,v 1.11 2003/06/02 23:28:22 millert Exp $ */ +/* $OpenBSD: ext2fs_alloc.c,v 1.12 2003/07/06 05:24:16 tedu Exp $ */ /* $NetBSD: ext2fs_alloc.c,v 1.10 2001/07/05 08:38:27 toshii Exp $ */ /* @@ -535,7 +535,7 @@ ext2fs_inode_free(struct inode *pip, ino_t ino, int mode) int error, cg; fs = pip->i_e2fs; - if ((u_int)ino >= fs->e2fs.e2fs_icount || (u_int)ino < EXT2_FIRSTINO) + if ((u_int)ino > fs->e2fs.e2fs_icount || (u_int)ino < EXT2_FIRSTINO) panic("ifree: range: dev = 0x%x, ino = %d, fs = %s", pip->i_dev, ino, fs->e2fs_fsmnt); cg = ino_to_cg(fs, ino); |