ext4: shortcut setting of xattr to the same value
authorJan Kara <jack@suse.cz>
Tue, 23 Feb 2016 03:43:04 +0000 (22:43 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 23 Feb 2016 03:43:04 +0000 (22:43 -0500)
commit3fd164629d25b04f291a79a013dcc7ce1a301269
tree52e5cd01818b7d390361d5f1a459b1c1edd8ad5d
parentdc8d5e565f00c9442fa1cbf9acc115475628527c
ext4: shortcut setting of xattr to the same value

When someone tried to set xattr to the same value (i.e., not changing
anything) we did all the work of removing original xattr, possibly
breaking references to shared xattr block, inserting new xattr, and
merging xattr blocks again. Since this is not so rare operation and it
is relatively cheap for us to detect this case, check for this and
shortcut xattr setting in that case.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/xattr.c