mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
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: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
99179fb898
commit
d09a8468d9
@ -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: */
|
||||
|
Loading…
Reference in New Issue
Block a user