mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
ext4: use ext4_update_inode_fsync_trans() helper in inode creation
Call helper function ext4_update_inode_fsync_trans() instead of open coding it in __ext4_new_inode(). This helper checks both that the handle is valid *and* that it hasn't been aborted due to some fatal error in the journalling layer, using is_handle_aborted(). Signed-off-by: Luis Henriques (SUSE) <luis.henriques@linux.dev> Link: https://patch.msgid.link/20240527161447.21434-1-luis.henriques@linux.dev Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
7378e8991a
commit
2d4d6bda0f
@ -1336,10 +1336,7 @@ got:
|
||||
}
|
||||
}
|
||||
|
||||
if (ext4_handle_valid(handle)) {
|
||||
ei->i_sync_tid = handle->h_transaction->t_tid;
|
||||
ei->i_datasync_tid = handle->h_transaction->t_tid;
|
||||
}
|
||||
ext4_update_inode_fsync_trans(handle, inode, 1);
|
||||
|
||||
err = ext4_mark_inode_dirty(handle, inode);
|
||||
if (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user