Commit d09a8468 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: fsync() should not return -EROFS



fsync has a slightly odd usage of -EROFS, where it means "does not
support fsync". I didn't choose it...

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 99179fb8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -202,7 +202,10 @@ int bch2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
		goto out;
	ret = bch2_flush_inode(c, inode);
out:
	return bch2_err_class(ret);
	ret = bch2_err_class(ret);
	if (ret == -EROFS)
		ret = -EIO;
	return ret;
}

/* truncate: */