diff options
-rw-r--r-- | libdiskfs/io-prenotify.c | 5 | ||||
-rw-r--r-- | libdiskfs/io-write.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libdiskfs/io-prenotify.c b/libdiskfs/io-prenotify.c index 4eb1c657..e8cd10e4 100644 --- a/libdiskfs/io-prenotify.c +++ b/libdiskfs/io-prenotify.c @@ -33,7 +33,10 @@ diskfs_S_io_prenotify (struct protid *cred, if (!cred) return EOPNOTSUPP; - + + if (diskfs_check_readonly ()) + return EROFS; + np = cred->po->np; /* Clamp it down */ 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; |