diff options
author | Miles Bader <miles@gnu.org> | 1996-08-15 21:27:39 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-08-15 21:27:39 +0000 |
commit | 098b8c31c2f6c961998c795935e8670aed550c34 (patch) | |
tree | 20256d0108247e4ebbbb1fbb1178e53332a9f988 /ext2fs | |
parent | 172f5caa78f91cd4679d0872f7cf5e643a101312 (diff) |
(read_disknode): Change assertion to allow non-zero st_size for anything, but
assert that st_blocks == 0 for any case where we set allocsize to 0.
Diffstat (limited to 'ext2fs')
-rw-r--r-- | ext2fs/inode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c index 4e864ac7..3a00a448 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -283,10 +283,13 @@ read_disknode (struct node *np) } else /* Allocsize should be zero for anything except directories, files, and - long symlinks. */ + long symlinks. These are the only things allowed to have any blocks + allocated as well, although st_size may be zero for any type (cases + where st_blocks=0 and st_size>0 include fast symlinks, and, under + linux, some devices). */ { np->allocsize = 0; - assert (st->st_size == 0 || S_ISLNK (st->st_mode)); + assert (st->st_blocks == 0); } return 0; |