mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-23 15:09:06 -05:00
bcachefs: minor fsync fix
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
9c859dc91b
commit
bb1b3658aa
@@ -2107,7 +2107,7 @@ int bch2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
{
|
||||
struct bch_inode_info *inode = file_bch_inode(file);
|
||||
struct bch_fs *c = inode->v.i_sb->s_fs_info;
|
||||
int ret;
|
||||
int ret, ret2;
|
||||
|
||||
ret = file_write_and_wait_range(file, start, end);
|
||||
if (ret)
|
||||
@@ -2123,7 +2123,10 @@ int bch2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
if (c->opts.journal_flush_disabled)
|
||||
return 0;
|
||||
|
||||
return bch2_journal_flush_seq(&c->journal, inode->ei_journal_seq);
|
||||
ret = bch2_journal_flush_seq(&c->journal, inode->ei_journal_seq);
|
||||
ret2 = file_check_and_advance_wb_err(file);
|
||||
|
||||
return ret ?: ret2;
|
||||
}
|
||||
|
||||
/* truncate: */
|
||||
|
||||
Reference in New Issue
Block a user