Fixed so that it can grok old style "fastlinks".

This commit is contained in:
David Greenman 1994-08-02 12:54:27 +00:00
parent 87006abef6
commit 3aa3bb33c4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1820
6 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ ckinode(dp, idesc)
idesc->id_filesize = dp->di_size;
mode = dp->di_mode & IFMT;
if (mode == IFBLK || mode == IFCHR || (mode == IFLNK &&
dp->di_size < sblock.fs_maxsymlinklen))
(dp->di_size < sblock.fs_maxsymlinklen || dp->di_blocks == 0)))
return (KEEPON);
dino = *dp;
ndb = howmany(dino.di_size, sblock.fs_bsize);

View File

@ -160,7 +160,7 @@ checkinode(inumber, idesc)
* Fake ndb value so direct/indirect block checks below
* will detect any garbage after symlink string.
*/
if (dp->di_size < sblock.fs_maxsymlinklen) {
if ((dp->di_size < sblock.fs_maxsymlinklen) || dp->di_blocks == 0) {
ndb = howmany(dp->di_size, sizeof(daddr_t));
if (ndb > NDADDR) {
j = ndb - NDADDR;

View File

@ -63,7 +63,7 @@ ckinode(dp, idesc)
idesc->id_filesize = dp->di_size;
mode = dp->di_mode & IFMT;
if (mode == IFBLK || mode == IFCHR || (mode == IFLNK &&
dp->di_size < sblock.fs_maxsymlinklen))
(dp->di_size < sblock.fs_maxsymlinklen || dp->di_blocks == 0)))
return (KEEPON);
dino = *dp;
ndb = howmany(dino.di_size, sblock.fs_bsize);

View File

@ -160,7 +160,7 @@ checkinode(inumber, idesc)
* Fake ndb value so direct/indirect block checks below
* will detect any garbage after symlink string.
*/
if (dp->di_size < sblock.fs_maxsymlinklen) {
if ((dp->di_size < sblock.fs_maxsymlinklen) || dp->di_blocks == 0) {
ndb = howmany(dp->di_size, sizeof(daddr_t));
if (ndb > NDADDR) {
j = ndb - NDADDR;

View File

@ -63,7 +63,7 @@ ckinode(dp, idesc)
idesc->id_filesize = dp->di_size;
mode = dp->di_mode & IFMT;
if (mode == IFBLK || mode == IFCHR || (mode == IFLNK &&
dp->di_size < sblock.fs_maxsymlinklen))
(dp->di_size < sblock.fs_maxsymlinklen || dp->di_blocks == 0)))
return (KEEPON);
dino = *dp;
ndb = howmany(dino.di_size, sblock.fs_bsize);

View File

@ -160,7 +160,7 @@ checkinode(inumber, idesc)
* Fake ndb value so direct/indirect block checks below
* will detect any garbage after symlink string.
*/
if (dp->di_size < sblock.fs_maxsymlinklen) {
if ((dp->di_size < sblock.fs_maxsymlinklen) || dp->di_blocks == 0) {
ndb = howmany(dp->di_size, sizeof(daddr_t));
if (ndb > NDADDR) {
j = ndb - NDADDR;