From e9d2c29f0ad03e31b6264deb9605f25989791630 Mon Sep 17 00:00:00 2001 From: Al Smith Date: Tue, 13 Apr 1999 15:52:53 +0000 Subject: bug fixes: block/char devices fixed (NB: IRIX uses 32-bit wide dev_t, linux only has 16-bit wide dev_t. this is apparently going to change in linux-2.3 but for now we can't handle devices with major or minor numbers > 255. handling of empty directory slots has been fixed. --- fs/efs/dir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fs/efs/dir.c') diff --git a/fs/efs/dir.c b/fs/efs/dir.c index 89dedbdb8..88e181690 100644 --- a/fs/efs/dir.c +++ b/fs/efs/dir.c @@ -46,8 +46,6 @@ struct inode_operations efs_dir_inode_operations = { NULL /* smap */ }; -/* read the next entry for a given directory */ - static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) { struct inode *inode = filp->f_dentry->d_inode; struct efs_inode_info *ini = INODE_INFO(inode); @@ -94,6 +92,11 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) { } while(slot < dirblock->slots) { + if (dirblock->space[slot] == 0) { + slot++; + continue; + } + dirslot = (struct efs_dentry *) (((char *) bh->b_data) + EFS_SLOTAT(dirblock, slot)); inodenum = be32_to_cpu(dirslot->inode); -- cgit v1.2.3