projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99179fb
)
bcachefs: fsync() should not return -EROFS
author
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 8 May 2024 21:33:29 +0000
(17:33 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 9 May 2024 20:23:36 +0000
(16:23 -0400)
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>
fs/bcachefs/fs-io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/fs-io.c
b/fs/bcachefs/fs-io.c
index 442bcb0793c412787c33ab3ba29581dd2087608a..ef20b64033e09953bea9160ec8aeed8434058f79 100644
(file)
--- a/
fs/bcachefs/fs-io.c
+++ b/
fs/bcachefs/fs-io.c
@@
-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: */