diff options
author | Harshad Shirwadkar <harshadshirwadkar@gmail.com> | 2021-12-23 12:21:37 -0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-12-23 18:13:25 -0500 |
commit | 2729cfdcfa1cc49bef5a90d046fa4a187fdfcc69 (patch) | |
tree | fa4588c2654d7f04e5b0bcf33aa46e5c6b92c64a /fs/ext4/ioctl.c | |
parent | 960e0ab63b2e5d8476bc873743f812e9e90cd047 (diff) |
ext4: use ext4_journal_start/stop for fast commit transactions
This patch drops all calls to ext4_fc_start_update() and
ext4_fc_stop_update(). To ensure that there are no ongoing journal
updates during fast commit, we also make jbd2_fc_begin_commit() lock
journal for updates. This way we don't have to maintain two different
transaction start stop APIs for fast commit and full commit. This
patch doesn't remove the functions altogether since in future we want
to have inode level locking for fast commits.
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Link: https://lore.kernel.org/r/20211223202140.2061101-2-harshads@google.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 606dee9e08a3..e64a12e1218a 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -743,7 +743,6 @@ int ext4_fileattr_set(struct user_namespace *mnt_userns, u32 flags = fa->flags; int err = -EOPNOTSUPP; - ext4_fc_start_update(inode); if (flags & ~EXT4_FL_USER_VISIBLE) goto out; @@ -764,7 +763,6 @@ int ext4_fileattr_set(struct user_namespace *mnt_userns, goto out; err = ext4_ioctl_setproject(inode, fa->fsx_projid); out: - ext4_fc_stop_update(inode); return err; } @@ -1273,13 +1271,7 @@ resizefs_out: long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { - long ret; - - ext4_fc_start_update(file_inode(filp)); - ret = __ext4_ioctl(filp, cmd, arg); - ext4_fc_stop_update(file_inode(filp)); - - return ret; + return __ext4_ioctl(filp, cmd, arg); } #ifdef CONFIG_COMPAT |