if (filldir(dirent, de->name, size, f->f_pos, de->ino, DT_UNKNOWN) < 0) { 
if (filldir(dirent, de->name, size, f->f_pos, le16_to_cpu(de->ino), DT_UNKNOWN) < 0) { 
static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir){	struct inode * dir = f->f_dentry->d_inode;	struct buffer_head * bh;	struct bfs_dirent * de;	unsigned int offset;	int block;	lock_kernel();	if (f->f_pos & (BFS_DIRENT_SIZE-1)) {		printf("Bad f_pos=%08lx for %s:%08lx\n", (unsigned long)f->f_pos, 			dir->i_sb->s_id, dir->i_ino);		unlock_kernel();		return -EBADF;	}	while (f->f_pos < dir->i_size) {		offset = f->f_pos & (BFS_BSIZE-1);		block = BFS_I(dir)->i_sblock + (f->f_pos >> BFS_BSIZE_BITS);		bh = sb_bread(dir->i_sb, block);		if (!bh) {			f->f_pos += BFS_BSIZE - offset;			continue;		}		do {			de = (struct bfs_dirent *)(bh->b_data + offset);			if (de->ino) {				int size = strnlen(de->name, BFS_NAMELEN);				if (filldir(dirent, de->name, size, f->f_pos, de->ino, DT_UNKNOWN) < 0) {					brelse(bh);					unlock_kernel();					return 0;				}			}			offset += BFS_DIRENT_SIZE;			f->f_pos += BFS_DIRENT_SIZE;		} while (offset < BFS_BSIZE && f->f_pos < dir->i_size);		brelse(bh);	}	unlock_kernel();	return 0;	}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/fac92becdaecff64dd91daab0292c5131de92f0d/dir.c/buggy/fs/bfs/dir.c