提交 b3155298 编写于 作者: T Tahsin Erdogan 提交者: Theodore Ts'o

ext4: fix credits calculation for xattr inode

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: NTahsin Erdogan <tahsin@google.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 7cec1918
......@@ -1588,8 +1588,7 @@ ext4_xattr_set(struct inode *inode, int name_index, const char *name,
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册