/* Re-compute the extended attribute hash value after an entry has changed.  */
static void ext2_xattr_rehash(struct ext2_xattr_header *, struct ext2_xattr_entry *)
/* Re-compute the extended attribute hash value after an entry has changed.  */
static void ext2_xattr_rehash(struct ext2_xattr_header *, struct ext2_xattr_entry *)
{
	struct ext2_xattr_entry *here;
	__u32 hash = 0;
	ext2_xattr_hash_entry(header, entry);
	here = ENTRY(header+1);
	while (!IS_LAST_ENTRY(here)) {
		if (!here->e_hash) {
			hash = 0;
			break;
		}
		hash = (hash << BLOCK_HASH_SHIFT) ^
		       (hash >> (8*sizeof(hash) - BLOCK_HASH_SHIFT)) ^
		       le32_to_cpu(here->e_hash);
		here = EXT2_XATTR_NEXT(here);
	}
	header->h_hash = cpu_to_le32(hash);
}