mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
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@linux.dev>
This commit is contained in:
parent
d9b022fee6
commit
416f685252
@ -1533,12 +1533,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;
|
||||
}
|
||||
|
||||
@ -1595,6 +1589,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;
|
||||
|
Loading…
Reference in New Issue
Block a user