From ad70122060affb9501238223274761a26f9eb184 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Tue, 9 Jul 2002 19:43:39 +0000 Subject: [PATCH] - Change all LK_SHARE locks to LK_EXCLUSIVE. Shared locks aren't quite safe yet - Use vop_std{lock,unlock,islocked}. --- sys/fs/fdescfs/fdesc_vnops.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 62852e8d4e94..1cc8db5b9985 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -190,7 +190,7 @@ fdesc_lookup(ap) if (cnp->cn_namelen == 1 && *pname == '.') { *vpp = dvp; VREF(dvp); - vn_lock(dvp, LK_SHARED | LK_RETRY, td); + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); return (0); } @@ -221,12 +221,12 @@ fdesc_lookup(ap) if (error) goto bad; VTOFDESC(fvp)->fd_fd = fd; - vn_lock(fvp, LK_SHARED | LK_RETRY, td); + vn_lock(fvp, LK_EXCLUSIVE | LK_RETRY, td); *vpp = fvp; return (0); bad: - vn_lock(dvp, LK_SHARED | LK_RETRY, td); + vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td); *vpp = NULL; return (error); } @@ -564,6 +564,9 @@ static struct vnodeopv_entry_desc fdesc_vnodeop_entries[] = { { &vop_readdir_desc, (vop_t *) fdesc_readdir }, { &vop_reclaim_desc, (vop_t *) fdesc_reclaim }, { &vop_setattr_desc, (vop_t *) fdesc_setattr }, + { &vop_lock_desc, (vop_t *) vop_stdlock }, + { &vop_unlock_desc, (vop_t *) vop_stdunlock }, + { &vop_islocked_desc, (vop_t *) vop_stdislocked }, { NULL, NULL } }; static struct vnodeopv_desc fdesc_vnodeop_opv_desc =