summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs/ntfs_subr.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-01-24 12:34:30 +0000
committerattilio <attilio@FreeBSD.org>2008-01-24 12:34:30 +0000
commit7213f4c32b94b60add6400f4213c1ca347bd609f (patch)
treec29223c268b9510bd1f4bee082ad1de97c817c24 /sys/fs/ntfs/ntfs_subr.c
parent5671b69e5898140ead9c08fe7f302dde1d680c63 (diff)
downloadFreeBSD-src-7213f4c32b94b60add6400f4213c1ca347bd609f.zip
FreeBSD-src-7213f4c32b94b60add6400f4213c1ca347bd609f.tar.gz
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
Diffstat (limited to 'sys/fs/ntfs/ntfs_subr.c')
-rw-r--r--sys/fs/ntfs/ntfs_subr.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c
index 330252f..f05a915 100644
--- a/sys/fs/ntfs/ntfs_subr.c
+++ b/sys/fs/ntfs/ntfs_subr.c
@@ -358,8 +358,7 @@ ntfs_ntget(ip)
mtx_lock(&ip->i_interlock);
ip->i_usecount++;
- lockmgr(&ip->i_lock, LK_EXCLUSIVE | LK_INTERLOCK, &ip->i_interlock,
- curthread);
+ lockmgr(&ip->i_lock, LK_EXCLUSIVE | LK_INTERLOCK, &ip->i_interlock);
return 0;
}
@@ -390,8 +389,7 @@ ntfs_ntlookup(
*ipp = ip;
return (0);
}
- } while (lockmgr(&ntfs_hashlock, LK_EXCLUSIVE | LK_SLEEPFAIL, NULL,
- curthread));
+ } while (lockmgr(&ntfs_hashlock, LK_EXCLUSIVE | LK_SLEEPFAIL, NULL));
MALLOC(ip, struct ntnode *, sizeof(struct ntnode), M_NTFSNTNODE,
M_WAITOK | M_ZERO);
@@ -413,7 +411,7 @@ ntfs_ntlookup(
ntfs_nthashins(ip);
- lockmgr(&ntfs_hashlock, LK_RELEASE, NULL, curthread);
+ lockmgr(&ntfs_hashlock, LK_RELEASE, NULL);
*ipp = ip;
@@ -449,8 +447,7 @@ ntfs_ntput(ip)
#endif
if (ip->i_usecount > 0) {
- lockmgr(&ip->i_lock, LK_RELEASE|LK_INTERLOCK, &ip->i_interlock,
- curthread);
+ lockmgr(&ip->i_lock, LK_RELEASE|LK_INTERLOCK, &ip->i_interlock);
return;
}
@@ -1982,7 +1979,7 @@ ntfs_toupper_use(mp, ntmp)
struct vnode *vp;
/* get exclusive access */
- lockmgr(&ntfs_toupper_lock, LK_EXCLUSIVE, NULL, curthread);
+ lockmgr(&ntfs_toupper_lock, LK_EXCLUSIVE, NULL);
/* only read the translation data from a file if it hasn't been
* read already */
@@ -2005,7 +2002,7 @@ ntfs_toupper_use(mp, ntmp)
out:
ntfs_toupper_usecount++;
- lockmgr(&ntfs_toupper_lock, LK_RELEASE, NULL, curthread);
+ lockmgr(&ntfs_toupper_lock, LK_RELEASE, NULL);
return (error);
}
@@ -2017,7 +2014,7 @@ void
ntfs_toupper_unuse()
{
/* get exclusive access */
- lockmgr(&ntfs_toupper_lock, LK_EXCLUSIVE, NULL, curthread);
+ lockmgr(&ntfs_toupper_lock, LK_EXCLUSIVE, NULL);
ntfs_toupper_usecount--;
if (ntfs_toupper_usecount == 0) {
@@ -2032,7 +2029,7 @@ ntfs_toupper_unuse()
#endif
/* release the lock */
- lockmgr(&ntfs_toupper_lock, LK_RELEASE, NULL, curthread);
+ lockmgr(&ntfs_toupper_lock, LK_RELEASE, NULL);
}
int
OpenPOWER on IntegriCloud