From 9be6a4a9b49b8166c453c95899280837970e0a2a Mon Sep 17 00:00:00 2001 From: hannken Date: Wed, 10 Aug 2011 06:19:54 +0000 Subject: [PATCH] Use LK_SHARED, it is sufficient for VOP_GETATTR() and VOP_READDIR(). --- sys/fs/union/union_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/fs/union/union_subr.c b/sys/fs/union/union_subr.c index a0e545531ec7..a1cdf02eec2d 100644 --- a/sys/fs/union/union_subr.c +++ b/sys/fs/union/union_subr.c @@ -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 -__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 #include @@ -1221,7 +1221,7 @@ union_check_rmdir(struct union_node *un, kauth_cred_t cred) 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);