summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-10-22 09:32:48 +0000
committerdg <dg@FreeBSD.org>1995-10-22 09:32:48 +0000
commitb5341559e2be008ac6cd1e40a68bdd77a3ec8b63 (patch)
tree67d743dd75dac0605db551f3d4f64632e50167ea /sys/kern/vfs_vnops.c
parent67678134fdc677845e30d947c441374ac61106a6 (diff)
downloadFreeBSD-src-b5341559e2be008ac6cd1e40a68bdd77a3ec8b63.zip
FreeBSD-src-b5341559e2be008ac6cd1e40a68bdd77a3ec8b63.tar.gz
Moved the filesystem read-only check out of the syscalls and into the
filesystem layer, as was done in lite-2. Merged in some other cosmetic changes while I was at it. Rewrote most of msdosfs_access() to be more like ufs_access() and to include the FS read-only check. Obtained from: partially from 4.4BSD-lite2
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index a2cc2f7..46e897f 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94
- * $Id: vfs_vnops.c,v 1.17 1995/07/20 09:43:04 davidg Exp $
+ * $Id: vfs_vnops.c,v 1.18 1995/10/06 09:43:32 phk Exp $
*/
#include <sys/param.h>
@@ -194,19 +194,6 @@ vn_writechk(vp)
{
/*
- * Disallow write attempts on read-only file systems;
- * unless the file is a socket or a block or character
- * device resident on the file system.
- */
- if (vp->v_mount->mnt_flag & MNT_RDONLY) {
- switch (vp->v_type) {
- case VREG: case VDIR: case VLNK:
- return (EROFS);
- default:
- break;
- }
- }
- /*
* If there's shared text associated with
* the vnode, try to free it up once. If
* we fail, we can't allow writing.
OpenPOWER on IntegriCloud