aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/io-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/io-write.c')
-rw-r--r--libdiskfs/io-write.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
index 2e47c81c..17455bbc 100644
--- a/libdiskfs/io-write.c
+++ b/libdiskfs/io-write.c
@@ -35,6 +35,9 @@ diskfs_S_io_write (struct protid *cred,
if (!cred)
return EOPNOTSUPP;
+ if (diskfs_check_readonly ())
+ return EROFS;
+
np = cred->po->np;
if (!(cred->po->openstat & O_WRITE))
return EBADF;