Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/union Use LK_SHARED, it is sufficient for VOP_GETATTR...



details:   https://anonhg.NetBSD.org/src/rev/bdc230317911
branches:  trunk
changeset: 768163:bdc230317911
user:      hannken <hannken%NetBSD.org@localhost>
date:      Wed Aug 10 06:19:54 2011 +0000

description:
Use LK_SHARED, it is sufficient for VOP_GETATTR() and VOP_READDIR().

diffstat:

 sys/fs/union/union_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a0697cb7c6bb -r bdc230317911 sys/fs/union/union_subr.c
--- a/sys/fs/union/union_subr.c Wed Aug 10 05:42:32 2011 +0000
+++ b/sys/fs/union/union_subr.c Wed Aug 10 06:19:54 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: union_subr.c,v 1.44 2011/08/07 06:01:51 hannken Exp $  */
+/*     $NetBSD: union_subr.c,v 1.45 2011/08/10 06:19:54 hannken Exp $  */
 
 /*
  * Copyright (c) 1994
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.44 2011/08/07 06:01:51 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_subr.c,v 1.45 2011/08/10 06:19:54 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1221,7 +1221,7 @@
                return 0;
 
        /* Check lower for being empty. */
-       vn_lock(un->un_lowervp, LK_EXCLUSIVE | LK_RETRY);
+       vn_lock(un->un_lowervp, LK_SHARED | LK_RETRY);
        error = VOP_GETATTR(un->un_lowervp, &va, cred);
        if (error) {
                VOP_UNLOCK(un->un_lowervp);



Home | Main Index | Thread Index | Old Index