summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorLuis Henriques (SUSE) <luis.henriques@linux.dev>2024-05-27 17:14:47 +0100
committerTheodore Ts'o <tytso@mit.edu>2024-07-05 16:48:54 -0400
commit2d4d6bda0f7ba0f188a22698855a1397c8999df3 (patch)
tree24bfe65057bfe66f6a453e90faba3a8fc9499d8f /fs/ext4/ialloc.c
parent7378e8991a459f3e5672e4b06bf346adce062fd8 (diff)
downloadlinux-stable-2d4d6bda0f7ba0f188a22698855a1397c8999df3.tar.gz
linux-stable-2d4d6bda0f7ba0f188a22698855a1397c8999df3.tar.bz2
linux-stable-2d4d6bda0f7ba0f188a22698855a1397c8999df3.zip
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>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index e9bbb1da2d0a..9dfd768ed9f8 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -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) {