diff options
-rw-r--r-- | sys/sys/proc.h | 4 | ||||
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h index f56c47d..5b91733 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -914,7 +914,7 @@ void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); static __inline int -thread_pflags_set(int flags) +curthread_pflags_set(int flags) { struct thread *td; int save; @@ -926,7 +926,7 @@ thread_pflags_set(int flags) } static __inline void -thread_pflags_restore(int save) +curthread_pflags_restore(int save) { curthread->td_pflags &= save; diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index 3836060..f6b078f 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -234,7 +234,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, int size, if (num < 1) panic ("ffs_balloc_ufs1: ufs_getlbns returned indirect block"); #endif - saved_inbdflush = thread_pflags_set(TDP_INBDFLUSH); + saved_inbdflush = curthread_pflags_set(TDP_INBDFLUSH); /* * Fetch the first indirect block allocating if necessary. */ @@ -248,7 +248,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, int size, pref = ffs_blkpref_ufs1(ip, lbn, 0, (ufs1_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred, &newb)) != 0) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); return (error); } nb = newb; @@ -354,7 +354,7 @@ retry: * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = bp; return (0); } @@ -404,7 +404,7 @@ retry: bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); } @@ -426,11 +426,11 @@ retry: nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); fail: - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. @@ -772,7 +772,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size, if (num < 1) panic ("ffs_balloc_ufs2: ufs_getlbns returned indirect block"); #endif - saved_inbdflush = thread_pflags_set(TDP_INBDFLUSH); + saved_inbdflush = curthread_pflags_set(TDP_INBDFLUSH); /* * Fetch the first indirect block allocating if necessary. */ @@ -786,7 +786,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size, pref = ffs_blkpref_ufs2(ip, lbn, 0, (ufs2_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred, &newb)) != 0) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); return (error); } nb = newb; @@ -892,7 +892,7 @@ retry: * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = bp; return (0); } @@ -942,7 +942,7 @@ retry: bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); } @@ -970,11 +970,11 @@ retry: nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); fail: - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. |