Commit d09a8468 authored by Kent Overstreet's avatar Kent Overstreet

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
...@@ -202,7 +202,10 @@ int bch2_fsync(struct file *file, loff_t start, loff_t end, int datasync) ...@@ -202,7 +202,10 @@ int bch2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
goto out; goto out;
ret = bch2_flush_inode(c, inode); ret = bch2_flush_inode(c, inode);
out: out:
return bch2_err_class(ret); ret = bch2_err_class(ret);
if (ret == -EROFS)
ret = -EIO;
return ret;
} }
/* truncate: */ /* truncate: */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment