From 208e5f238a36652c2e612694191823a79d0046ab Mon Sep 17 00:00:00 2001 From: rwatson Date: Wed, 12 Oct 2005 14:18:58 +0000 Subject: When performing a VOP_LOOKUP() as part of UFS1 extended attribute auto-start, set cnp.cn_lkflags to LK_EXCLUSIVE. This flag must now be set so that lockmgr knows what kind of lock to acquire, and it will panic if not specified. This resulted in a panic when using extended attributes on UFS1 as of locking work present in the 6.x branch. This is a RELENG_6_0 merge candidate. Reported by: lofi MFC after: 3 days --- sys/ufs/ufs/ufs_extattr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index 273a8e2..59b15b1 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -251,6 +251,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname, cnp.cn_flags = ISLASTCN; if (lockparent == UE_GETDIR_LOCKPARENT) cnp.cn_flags |= LOCKPARENT; + cnp.cn_lkflags = LK_EXCLUSIVE; cnp.cn_thread = td; cnp.cn_cred = td->td_ucred; cnp.cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); -- cgit v1.1