/* A bucket that has never been written to disk doesn't need to be read. We just need the buffer_heads. Don't call this for buckets that are already on disk. ocfs2_read_xattr_bucket() initializes them fully.  */
static int ocfs2_init_xattr_bucket(struct ocfs2_xattr_bucket *bucket, u64 xb_blkno)
/* A bucket that has never been written to disk doesn't need to be read. We just need the buffer_heads. Don't call this for buckets that are already on disk. ocfs2_read_xattr_bucket() initializes them fully.  */
static int ocfs2_init_xattr_bucket(struct ocfs2_xattr_bucket *bucket, u64 xb_blkno)
{
	int i, rc = 0;
	for (i = 0; i < bucket->bu_blocks; i++) {
		bucket->bu_bhs[i] = sb_getblk(bucket->bu_inode->i_sb,
					      xb_blkno + i);
		if (!bucket->bu_bhs[i]) {
			rc = -EIO;
			mlog_errno(rc);
			break;
		}
		if (!ocfs2_buffer_uptodate(INODE_CACHE(bucket->bu_inode),
					   bucket->bu_bhs[i]))
			ocfs2_set_new_buffer_uptodate(INODE_CACHE(bucket->bu_inode),
						      bucket->bu_bhs[i]);
	}
	if (rc)
		ocfs2_xattr_bucket_relse(bucket);
	return rc;
}