summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorTahsin Erdogan <tahsin@google.com>2017-06-22 11:52:03 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-06-22 11:52:03 -0400
commitdaf8328172dffabb4a6b5e1970d6e9628669f51c (patch)
treed82e526976f0062d36fe349a85c40571f39c5fa7 /samples
parent9c6e7853c531c7cecca8c257bde767d089e5c880 (diff)
downloadlinux-daf8328172dffabb4a6b5e1970d6e9628669f51c.tar.gz
linux-daf8328172dffabb4a6b5e1970d6e9628669f51c.tar.bz2
linux-daf8328172dffabb4a6b5e1970d6e9628669f51c.zip
ext4: eliminate xattr entry e_hash recalculation for removes
When an extended attribute block is modified, ext4_xattr_hash_entry() recalculates e_hash for the entry that is pointed by s->here. This is unnecessary if the modification is to remove an entry. Currently, if the removed entry is the last one and there are other entries remaining, hash calculation targets the just erased entry which has been filled with zeroes and effectively does nothing. If the removed entry is not the last one and there are more entries, this time it will recalculate hash on the next entry which is totally unnecessary. Fix these by moving the decision on when to recalculate hash to ext4_xattr_set_entry(). Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions