]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: add missing xattr hash update
authorTahsin Erdogan <tahsin@google.com>
Mon, 14 Aug 2017 12:30:06 +0000 (08:30 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Aug 2017 12:30:06 +0000 (08:30 -0400)
commit80e30c631c9aadccbfff7e50367bed71c23908f8
treeae4a63af40995527827573cc0aa921540727a22b
parent182006746ba57b74727bf0291d762cd8f95b05ac
ext4: add missing xattr hash update

When updating an extended attribute, if the padded value sizes are the
same, a shortcut is taken to avoid the bulk of the work. This was fine
until the xattr hash update was moved inside ext4_xattr_set_entry().
With that change, the hash update got missed in the shortcut case.

Thanks to ZhangYi (yizhang089@gmail.com) for root causing the problem.

Fixes: 626140bcb6e7 ("ext4: eliminate xattr entry e_hash recalculation for removes")
Reported-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/xattr.c