diff options
author | attilio <attilio@FreeBSD.org> | 2008-02-25 18:45:57 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-02-25 18:45:57 +0000 |
commit | 4014b558307253555f43f360be60f49ea39b7ceb (patch) | |
tree | d455fa541ca0d9b761f28e9c67c92fd959e44b2c /sys/ufs/ffs | |
parent | 49cb35343eeaa02f4e480228eb7148a3305d3b70 (diff) | |
download | FreeBSD-src-4014b558307253555f43f360be60f49ea39b7ceb.zip FreeBSD-src-4014b558307253555f43f360be60f49ea39b7ceb.tar.gz |
Axe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it is
always curthread.
As KPI gets broken by this patch, manpages and __FreeBSD_version will be
updated by further commits.
Tested by: Andrea Barberio <insomniac at slackware dot it>
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r-- | sys/ufs/ffs/ffs_rawread.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index 6369f58..f10e432 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -66,7 +66,7 @@ static int ffs_rawread_readahead(struct vnode *vp, static int ffs_rawread_main(struct vnode *vp, struct uio *uio); -static int ffs_rawread_sync(struct vnode *vp, struct thread *td); +static int ffs_rawread_sync(struct vnode *vp); int ffs_rawread(struct vnode *vp, struct uio *uio, int *workdone); @@ -95,7 +95,7 @@ ffs_rawread_setup(void) static int -ffs_rawread_sync(struct vnode *vp, struct thread *td) +ffs_rawread_sync(struct vnode *vp) { int spl; int error; @@ -114,14 +114,14 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td) VI_UNLOCK(vp); if (vn_start_write(vp, &mp, V_NOWAIT) != 0) { - if (VOP_ISLOCKED(vp, td) != LK_EXCLUSIVE) + if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) upgraded = 1; else upgraded = 0; VOP_UNLOCK(vp, 0); (void) vn_start_write(vp, &mp, V_WAIT); VOP_LOCK(vp, LK_EXCLUSIVE); - } else if (VOP_ISLOCKED(vp, td) != LK_EXCLUSIVE) { + } else if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) { upgraded = 1; /* Upgrade to exclusive lock, this might block */ VOP_LOCK(vp, LK_UPGRADE); @@ -466,9 +466,7 @@ ffs_rawread(struct vnode *vp, (uio->uio_resid & (secsize - 1)) == 0) { /* Sync dirty pages and buffers if needed */ - error = ffs_rawread_sync(vp, - (uio->uio_td != NULL) ? - uio->uio_td : curthread); + error = ffs_rawread_sync(vp); if (error != 0) return error; |