Modify ei->i_flags before calling ext4_mark_iloc_dirty() so that the modifications to ei->i_flags can be reflected in the raw_inode during the call to ext4_mark_iloc_dirty()->ext4_do_update_inode() Signed-off-by: Julian Sun <sunjunchao2870@xxxxxxxxx> --- fs/ext4/inline.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 3536ca7e4fcc..d479495d03aa 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -465,11 +465,10 @@ static int ext4_destroy_inline_data_nolock(handle_t *handle, ext4_clear_inode_flag(inode, EXT4_INODE_INLINE_DATA); get_bh(is.iloc.bh); - error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); - EXT4_I(inode)->i_inline_off = 0; EXT4_I(inode)->i_inline_size = 0; ext4_clear_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA); + error = ext4_mark_iloc_dirty(handle, inode, &is.iloc); out: brelse(is.iloc.bh); if (error == -ENODATA) -- 2.39.5