Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs check read only mount appropriately.
details: https://anonhg.NetBSD.org/src/rev/ed138a655182
branches: trunk
changeset: 566388:ed138a655182
user: yamt <yamt%NetBSD.org@localhost>
date: Fri May 07 16:09:46 2004 +0000
description:
check read only mount appropriately.
(fix a bug of nfs_vnops.c rev.1.192.)
pointed by Rob Quinn on current-users@.
diffstat:
sys/nfs/nfs_vnops.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r d7225e3fef96 -r ed138a655182 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Fri May 07 15:51:04 2004 +0000
+++ b/sys/nfs/nfs_vnops.c Fri May 07 16:09:46 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vnops.c,v 1.192 2004/05/06 21:58:17 yamt Exp $ */
+/* $NetBSD: nfs_vnops.c,v 1.193 2004/05/07 16:09:46 yamt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.192 2004/05/06 21:58:17 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.193 2004/05/07 16:09:46 yamt Exp $");
#include "opt_nfs.h"
#include "opt_uvmhist.h"
@@ -925,7 +925,8 @@
* XXX although we have no way to know if O_EXCL is requested or not.
*/
- if (v3 && cnp->cn_nameiop == CREATE && (flags & ISLASTCN)) {
+ if (v3 && cnp->cn_nameiop == CREATE && (flags & ISLASTCN) &&
+ (dvp->v_mount->mnt_flag & MNT_RDONLY) == 0) {
KASSERT(lockparent);
cnp->cn_flags |= SAVENAME;
return (EJUSTRETURN);
Home |
Main Index |
Thread Index |
Old Index