diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 85552ba6915e..d8270de3a6e1 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -407,6 +407,7 @@ ext2_setattr(ap) /* Disallow flags not supported by ext2fs. */ if(vap->va_flags & ~(SF_APPEND | SF_IMMUTABLE | UF_NODUMP)) return (EOPNOTSUPP); + if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /*