From 7213f4c32b94b60add6400f4213c1ca347bd609f Mon Sep 17 00:00:00 2001 From: attilio Date: Thu, 24 Jan 2008 12:34:30 +0000 Subject: Cleanup lockmgr interface and exported KPI: - Remove the "thread" argument from the lockmgr() function as it is always curthread now - Axe lockcount() function as it is no longer used - Axe LOCKMGR_ASSERT() as it is bogus really and no currently used. Hopefully this will be soonly replaced by something suitable for it. - Remove the prototype for dumplockinfo() as the function is no longer present Addictionally: - Introduce a KASSERT() in lockstatus() in order to let it accept only curthread or NULL as they should only be passed - Do a little bit of style(9) cleanup on lockmgr.h KPI results heavilly broken by this change, so manpages and FreeBSD_version will be modified accordingly by further commits. Tested by: matteo --- sys/fs/msdosfs/msdosfs_denode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/fs/msdosfs/msdosfs_denode.c') diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index e3b962a..8fd61cd 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -105,7 +105,6 @@ deget(pmp, dirclust, diroffset, depp) struct denode *ldep; struct vnode *nvp, *xvp; struct buf *bp; - struct thread *td; #ifdef MSDOSFS_DEBUG printf("deget(pmp %p, dirclust %lu, diroffset %lx, depp %p)\n", @@ -171,15 +170,14 @@ deget(pmp, dirclust, diroffset, depp) ldep->de_inode = inode; fc_purge(ldep, 0); /* init the fat cache for this denode */ - td = curthread; - lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL, td); + lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL); error = insmntque(nvp, mntp); if (error != 0) { FREE(ldep, M_MSDOSFSNODE); *depp = NULL; return (error); } - error = vfs_hash_insert(nvp, inode, LK_EXCLUSIVE, td, &xvp, + error = vfs_hash_insert(nvp, inode, LK_EXCLUSIVE, curthread, &xvp, de_vncmpf, &inode); if (error) { *depp = NULL; -- cgit v1.1