diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-07-06 17:28:09 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-07-06 17:28:09 +0000 |
commit | 6bf2b7eeb6a41032bf61e482460bd204c225b71c (patch) | |
tree | b4d3590bc8c423a8eaa4e78fcab255ee6da6c42c | |
parent | 8a42898a06d44fcf29899b1341404eb14767cf60 (diff) |
(read_disknode): Don't set allocsize based on st->size for kludged
symlinks.
-rw-r--r-- | ufs/inode.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ufs/inode.c b/ufs/inode.c index c3eec832..aa2f3a8c 100644 --- a/ufs/inode.c +++ b/ufs/inode.c @@ -270,10 +270,17 @@ read_disknode (struct node *np) if (!S_ISBLK (st->st_mode) && !S_ISCHR (st->st_mode)) st->st_rdev = 0; - if (lblkno (sblock, np->dn_stat.st_size) < NDADDR) - np->allocsize = fragroundup (sblock, np->dn_stat.st_size); + if (S_ISLNK (st->st_mode) + && direct_symlink_extension + && st->st_size < sblock->fs_maxsymlinklen) + np->allocsize = 0; else - np->allocsize = blkroundup (sblock, np->dn_stat.st_size); + { + if (lblkno (sblock, np->dn_stat.st_size) < NDADDR) + np->allocsize = fragroundup (sblock, st->st_size); + else + np->allocsize = blkroundup (sblock, st->st_size); + } return 0; } |