When there is no space for a value in xattr block, it may be stored
in an xattr inode even if the value length is less than
EXT4_XATTR_MIN_LARGE_EA_SIZE(). So the current assumption in credits
calculation is wrong.
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
if (error)
return error;
- if ((value_len >= EXT4_XATTR_MIN_LARGE_EA_SIZE(sb->s_blocksize)) &&
- ext4_has_feature_ea_inode(sb)) {
+ if (ext4_has_feature_ea_inode(sb)) {
int nrblocks = (value_len + sb->s_blocksize - 1) >>
sb->s_blocksize_bits;