/* nilfs_sufile_read - read sufile inode @sufile: sufile inode @raw_inode: on-disk sufile inode  */
int nilfs_sufile_read(struct inode *sufile, struct nilfs_inode *raw_inode)
/* nilfs_sufile_read - read sufile inode @sufile: sufile inode @raw_inode: on-disk sufile inode  */
int nilfs_sufile_read(struct inode *sufile, struct nilfs_inode *raw_inode)
{
	struct nilfs_sufile_info *sui = NILFS_SUI(sufile);
	struct buffer_head *header_bh;
	struct nilfs_sufile_header *header;
	void *kaddr;
	int ret;
	ret = nilfs_read_inode_common(sufile, raw_inode);
	if (ret < 0)
		return ret;
	ret = nilfs_sufile_get_header_block(sufile, &header_bh);
	if (!ret) {
		kaddr = kmap_atomic(header_bh->b_page, KM_USER0);
		header = kaddr + bh_offset(header_bh);
		sui->ncleansegs = le64_to_cpu(header->sh_ncleansegs);
		kunmap_atomic(kaddr, KM_USER0);
		brelse(header_bh);
	}
	return ret;
}