insure that directories are always a multiple of DIRBLKSIZ in size
[unix-history] / usr / src / sys / ufs / lfs / lfs_vnops.c
index 9124c7f..eb5538c 100644 (file)
@@ -1,4 +1,4 @@
-/*     lfs_vnops.c     6.15    85/01/21        */
+/*     lfs_vnops.c     6.16    85/02/22        */
 
 #include "param.h"
 #include "systm.h"
 
 #include "param.h"
 #include "systm.h"
@@ -1192,6 +1192,10 @@ mkdir()
                dp->i_flag |= ICHG;
                goto bad;
        }
                dp->i_flag |= ICHG;
                goto bad;
        }
+       if (DIRBLKSIZ > ip->i_fs->fs_fsize)
+               panic("mkdir: blksize");     /* XXX - should grow with bmap() */
+       else
+               ip->i_size = DIRBLKSIZ;
        /*
         * Directory all set up, now
         * install the entry for it in
        /*
         * Directory all set up, now
         * install the entry for it in