de->ino = ino; 
de->ino = cpu_to_le16((u16)ino); 
static int bfs_add_entry(struct inode * dir, const char * name, int namelen, int ino){	struct buffer_head * bh;	struct bfs_dirent * de;	int block, sblock, eblock, off, eoff;	int i;	dprintf("name=%s, namelen=%d\n", name, namelen);	if (!namelen)		return -ENOENT;	if (namelen > BFS_NAMELEN)		return -ENAMETOOLONG;	sblock = BFS_I(dir)->i_sblock;	eblock = BFS_I(dir)->i_eblock;	eoff = dir->i_size % BFS_BSIZE;	for (block=sblock; block<=eblock; block++) {		bh = sb_bread(dir->i_sb, block);		if(!bh) 			return -ENOSPC;		for (off=0; off<BFS_BSIZE; off+=BFS_DIRENT_SIZE) {			de = (struct bfs_dirent *)(bh->b_data + off);			if (block==eblock && off>=eoff) {				/* Do not read/interpret the garbage in the end of eblock. */				de->ino = 0;			}			if (!de->ino) {				if ((block-sblock)*BFS_BSIZE + off >= dir->i_size) {					dir->i_size += BFS_DIRENT_SIZE;					dir->i_ctime = CURRENT_TIME_SEC;				}				dir->i_mtime = CURRENT_TIME_SEC;				mark_inode_dirty(dir);				de->ino = ino;				for (i=0; i<BFS_NAMELEN; i++)					de->name[i] = (i < namelen) ? name[i] : 0;				mark_buffer_dirty(bh);				brelse(bh);				return 0;			}		}		brelse(bh);	}	return -ENOSPC;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/fac92becdaecff64dd91daab0292c5131de92f0d/dir.c/buggy/fs/bfs/dir.c