/* When the entry is in xattr block, xattr_bh indicates the storage place. While if the entry is in index b-tree, "bucket" indicates the real place of the xattr.  */
static void ocfs2_xattr_update_xattr_search(struct inode *inode, struct ocfs2_xattr_search *xs, struct buffer_head *old_bh)
/* When the entry is in xattr block, xattr_bh indicates the storage place. While if the entry is in index b-tree, "bucket" indicates the real place of the xattr.  */
static void ocfs2_xattr_update_xattr_search(struct inode *inode, struct ocfs2_xattr_search *xs, struct buffer_head *old_bh)
{
	char *buf = old_bh->b_data;
	struct ocfs2_xattr_block *old_xb = (struct ocfs2_xattr_block *)buf;
	struct ocfs2_xattr_header *old_xh = &old_xb->xb_attrs.xb_header;
	int i;
	xs->header = bucket_xh(xs->bucket);
	xs->base = bucket_block(xs->bucket, 0);
	xs->end = xs->base + inode->i_sb->s_blocksize;
	if (xs->not_found)
		return;
	i = xs->here - old_xh->xh_entries;
	xs->here = &xs->header->xh_entries[i];
}