From 098b8c31c2f6c961998c795935e8670aed550c34 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Thu, 15 Aug 1996 21:27:39 +0000 Subject: (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. --- ext2fs/inode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ext2fs/inode.c') 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; -- cgit v1.2.3