Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/puffs RENAME lookup semantics say return EISDIR if dv...



details:   https://anonhg.NetBSD.org/src/rev/4f0933266c6f
branches:  trunk
changeset: 756363:4f0933266c6f
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jul 14 14:07:37 2010 +0000

description:
RENAME lookup semantics say return EISDIR if dvp = *vpp for the
last component .... obviously(!!)

diffstat:

 sys/fs/puffs/puffs_vnops.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 7fa75905801a -r 4f0933266c6f sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c        Wed Jul 14 13:09:52 2010 +0000
+++ b/sys/fs/puffs/puffs_vnops.c        Wed Jul 14 14:07:37 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: puffs_vnops.c,v 1.146 2010/06/24 13:03:10 hannken Exp $        */
+/*     $NetBSD: puffs_vnops.c,v 1.147 2010/07/14 14:07:37 pooka Exp $  */
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.146 2010/06/24 13:03:10 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.147 2010/07/14 14:07:37 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -500,6 +500,10 @@
        }
 
        if (isdot) {
+               /* deal with rename lookup semantics */
+               if (cnp->cn_nameiop == RENAME && (cnp->cn_flags & ISLASTCN))
+                       return EISDIR;
+
                vp = ap->a_dvp;
                vref(vp);
                *ap->a_vpp = vp;



Home | Main Index | Thread Index | Old Index