ext4_xattr: fix not computing hash of on-block entries
authorngkaho1234 <ngkaho1234@gmail.com>
Mon, 16 May 2016 10:08:14 +0000 (10:08 +0000)
committerngkaho1234 <ngkaho1234@gmail.com>
Mon, 16 May 2016 13:50:57 +0000 (13:50 +0000)
I forget to do that, sorry. :-(

src/ext4_xattr.c

index 240ac436ed36abaabe4fe7b2383e49aca75d9656..c5894e6a26093c97997d1c9353ffd2658f64b8f1 100644 (file)
@@ -867,6 +867,7 @@ static int ext4_xattr_write_to_disk(struct ext4_xattr_ref *xattr_ref)
                memcpy(EXT4_XATTR_NAME(block_entry), item->name,
                       item->name_len);
                memcpy(block_data, item->data, item->data_size);
+               ext4_xattr_compute_hash(block_header, block_entry);
                block_entry = EXT4_XATTR_NEXT(block_entry);
                block_size_rem -= EXT4_XATTR_SIZE(item->data_size) +
                                  EXT4_XATTR_LEN(item->name_len);