ext4: fix forgetten xattr lock protection in ext4_expand_extra_isize
authorMiao Xie <miaoxie@huawei.com>
Sun, 6 Aug 2017 04:27:38 +0000 (00:27 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 6 Aug 2017 04:27:38 +0000 (00:27 -0400)
commit3b10fdc6d8bd048f4fb14af5eda2051ace7b8b16
treecab4fdbe9b87cda858f93fa1b89519d69a9fd4df
parent9699d4f91d9bd2f70dcc37afe3c9f18145ab2dba
ext4: fix forgetten xattr lock protection in ext4_expand_extra_isize

We should avoid the contention between the i_extra_isize update and
the inline data insertion, so move the xattr trylock in front of
i_extra_isize update.

Signed-off-by: Miao Xie <miaoxie@huawei.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
fs/ext4/inode.c
fs/ext4/xattr.c