summaryrefslogtreecommitdiff
path: root/libbcachefs/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/io.c')
-rw-r--r--libbcachefs/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbcachefs/io.c b/libbcachefs/io.c
index 7cc26af1..7312ab2a 100644
--- a/libbcachefs/io.c
+++ b/libbcachefs/io.c
@@ -1221,7 +1221,8 @@ void bch2_write(struct closure *cl)
if (c->opts.nochanges ||
!percpu_ref_tryget(&c->writes)) {
- __bcache_io_error(c, "read only");
+ if (!(op->flags & BCH_WRITE_FROM_INTERNAL))
+ __bcache_io_error(c, "read only");
op->error = -EROFS;
goto err;
}