Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs nfs_lookup: avoid CREATE optimization for DOTDOT.
details: https://anonhg.NetBSD.org/src/rev/c3227c74bbb2
branches: trunk
changeset: 566422:c3227c74bbb2
user: yamt <yamt%NetBSD.org@localhost>
date: Sat May 08 21:35:13 2004 +0000
description:
nfs_lookup: avoid CREATE optimization for DOTDOT.
creating a DOTDOT entry has no sense and will fail anyway.
diffstat:
sys/nfs/nfs_vnops.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r f735ed3665f7 -r c3227c74bbb2 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Sat May 08 21:33:41 2004 +0000
+++ b/sys/nfs/nfs_vnops.c Sat May 08 21:35:13 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vnops.c,v 1.195 2004/05/08 21:33:41 yamt Exp $ */
+/* $NetBSD: nfs_vnops.c,v 1.196 2004/05/08 21:35:13 yamt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.195 2004/05/08 21:33:41 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.196 2004/05/08 21:35:13 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|ISDOTDOT)) == ISLASTCN &&
(dvp->v_mount->mnt_flag & MNT_RDONLY) == 0) {
KASSERT(lockparent);
cnp->cn_flags |= SAVENAME;
Home |
Main Index |
Thread Index |
Old Index