From 5e6a926611bfff2eb270e5f95acec7b27df5c393 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Mon, 13 Apr 2009 23:09:44 +0000 Subject: [PATCH] - use a shared lock for reads - remove stale comment Reviewed by: jeffr --- sys/kern/vfs_vnops.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 48a74aca1c10..2f085d96ab8e 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -379,14 +379,8 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, active_cred, file_cred, != 0) return (error); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } else { - /* - * XXX This should be LK_SHARED but I don't trust VFS - * enough to leave it like that until it has been - * reviewed further. - */ - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } + } else + vn_lock(vp, LK_SHARED | LK_RETRY); } ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held");