summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-01 00:59:34 +0000
committerRoland McGrath <roland@gnu.org>2002-08-01 00:59:34 +0000
commit192b1a04ae6308ecc35f0ae89db9c5071b867da8 (patch)
tree99633098f1a5e153833fb35d7b184ca869469273
parent36d5868898ecfc6337b7f6a5f49439c4106d9c67 (diff)
2002-07-31 Roland McGrath <roland@frob.com>
* dir.c (diskfs_direnter_hard): Fix test in last change.
-rw-r--r--ext2fs/dir.c2
-rw-r--r--ufs/dir.c2
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);
diff --git a/ufs/dir.c b/ufs/dir.c
index b67e45f6..83b30e72 100644
--- a/ufs/dir.c
+++ b/ufs/dir.c
@@ -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);