info->si_blocks = (bfs_sb->s_end + 1)>>BFS_BSIZE_BITS; /* for statfs(2) */ info->si_freeb = (bfs_sb->s_end + 1 - bfs_sb->s_start)>>BFS_BSIZE_BITS; 
info->si_blocks = (le32_to_cpu(bfs_sb->s_end) + 1)>>BFS_BSIZE_BITS; /* for statfs(2) */ info->si_freeb = (le32_to_cpu(bfs_sb->s_end) + 1 -  cpu_to_le32(bfs_sb->s_start))>>BFS_BSIZE_BITS; 
static int bfs_fill_super(struct super_block *s, void *data, int silent){	struct buffer_head * bh;	struct bfs_super_block * bfs_sb;	struct inode * inode;	int i, imap_len;	struct bfs_sb_info * info;	info = kmalloc(sizeof(*info), GFP_KERNEL);	if (!info)		return -ENOMEM;	s->s_fs_info = info;	memset(info, 0, sizeof(*info));	sb_set_blocksize(s, BFS_BSIZE);	bh = sb_bread(s, 0);	if(!bh)		goto out;	bfs_sb = (struct bfs_super_block *)bh->b_data;	if (bfs_sb->s_magic != BFS_MAGIC) {		if (!silent)			printf("No BFS filesystem on %s (magic=%08x)\n", 				s->s_id, bfs_sb->s_magic);		goto out;	}	if (BFS_UNCLEAN(bfs_sb, s) && !silent)		printf("%s is unclean, continuing\n", s->s_id);	s->s_magic = BFS_MAGIC;	info->si_bfs_sb = bfs_sb;	info->si_sbh = bh;	info->si_lasti = (bfs_sb->s_start - BFS_BSIZE)/sizeof(struct bfs_inode) 			+ BFS_ROOT_INO - 1;	imap_len = info->si_lasti/8 + 1;	info->si_imap = kmalloc(imap_len, GFP_KERNEL);	if (!info->si_imap)		goto out;	memset(info->si_imap, 0, imap_len);	for (i=0; i<BFS_ROOT_INO; i++) 		set_bit(i, info->si_imap);	s->s_op = &bfs_sops;	inode = iget(s, BFS_ROOT_INO);	if (!inode) {		kfree(info->si_imap);		goto out;	}	s->s_root = d_alloc_root(inode);	if (!s->s_root) {		iput(inode);		kfree(info->si_imap);		goto out;	}	info->si_blocks = (bfs_sb->s_end + 1)>>BFS_BSIZE_BITS; /* for statfs(2) */	info->si_freeb = (bfs_sb->s_end + 1 - bfs_sb->s_start)>>BFS_BSIZE_BITS;	info->si_freei = 0;	info->si_lf_eblk = 0;	info->si_lf_sblk = 0;	info->si_lf_ioff = 0;	for (i=BFS_ROOT_INO; i<=info->si_lasti; i++) {		inode = iget(s,i);		if (BFS_I(inode)->i_dsk_ino == 0)			info->si_freei++;		else {			set_bit(i, info->si_imap);			info->si_freeb -= inode->i_blocks;			if (BFS_I(inode)->i_eblock > info->si_lf_eblk) {				info->si_lf_eblk = BFS_I(inode)->i_eblock;				info->si_lf_sblk = BFS_I(inode)->i_sblock;				info->si_lf_ioff = BFS_INO2OFF(i);			}		}		iput(inode);	}	if (!(s->s_flags & MS_RDONLY)) {		mark_buffer_dirty(bh);		s->s_dirt = 1;	} 	dump_imap("read_super", s);	return 0;out:	brelse(bh);	kfree(info);	s->s_fs_info = NULL;	return -EINVAL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/fac92becdaecff64dd91daab0292c5131de92f0d/inode.c/buggy/fs/bfs/inode.c