diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 2fd3b0e41787..a679a482c986 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c @@ -1054,6 +1054,11 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode, } } + if (ext4_handle_valid(handle)) { + ei->i_sync_tid = handle->h_transaction->t_tid; + ei->i_datasync_tid = handle->h_transaction->t_tid; + } + err = ext4_mark_inode_dirty(handle, inode); if (err) { ext4_std_error(sb, err);