diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-08-22 16:30:55 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-08-22 16:43:51 -0400 |
commit | 4684c225efe9a9222ef1dfb3ce88d5adadee6bc6 (patch) | |
tree | 6b704d5b85affee3cee8ff913a0cfbb2e6566300 | |
parent | 890bd6c66dd51d57f3f4339bf21f794d4061c2bf (diff) |
bcachefs: Don't flush journal from bch2_vfs_write_inode()
It's only updating timestamps, so this doubly doesn't make sense. fsync
will flush the journal, if necessary.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rw-r--r-- | fs/bcachefs/fs.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index a35f34eb293c..011376b9a5f1 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -1449,12 +1449,6 @@ static int bch2_vfs_write_inode(struct inode *vinode, ATTR_ATIME|ATTR_MTIME|ATTR_CTIME); mutex_unlock(&inode->ei_update_lock); - if (c->opts.journal_flush_disabled) - return ret; - - if (!ret && wbc->sync_mode == WB_SYNC_ALL) - ret = bch2_journal_flush_seq(&c->journal, inode->ei_journal_seq); - return ret; } @@ -1511,6 +1505,9 @@ static int bch2_sync_fs(struct super_block *sb, int wait) { struct bch_fs *c = sb->s_fs_info; + if (c->opts.journal_flush_disabled) + return 0; + if (!wait) { bch2_journal_flush_async(&c->journal, NULL); return 0; |