diff options
-rw-r--r-- | ext2fs/dir.c | 2 | ||||
-rw-r--r-- | ufs/dir.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext2fs/dir.c b/ext2fs/dir.c index 4b085d14..1ad9f7e6 100644 --- a/ext2fs/dir.c +++ b/ext2fs/dir.c @@ -601,7 +601,7 @@ diskfs_direnter_hard (struct node *dp, const char *name, struct node *np, assert (needed <= DIRBLKSIZ); oldsize = dp->dn_stat.st_size; - if ((off_t)(oldsize + DIRBLKSIZ) != dp->dn_stat.st_size) + if ((off_t)(oldsize + DIRBLKSIZ) != (dp->dn_stat.st_size + DIRBLKSIZ)) { /* We can't possibly map the whole directory in. */ munmap ((caddr_t) ds->mapbuf, ds->mapextent); @@ -585,7 +585,7 @@ diskfs_direnter_hard(struct node *dp, assert (needed <= DIRBLKSIZ); oldsize = dp->dn_stat.st_size; - if ((off_t)(oldsize + DIRBLKSIZ) != dp->dn_stat.st_size) + if ((off_t)(oldsize + DIRBLKSIZ) != dp->dn_stat.st_size + DIRBLKSIZ) { /* We can't possibly map the whole directory in. */ munmap ((caddr_t) ds->mapbuf, ds->mapextent); |