diff options
Diffstat (limited to 'sys/ufs/ufs/ufs_readwrite.c')
-rw-r--r-- | sys/ufs/ufs/ufs_readwrite.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c index 0308895..83673eb 100644 --- a/sys/ufs/ufs/ufs_readwrite.c +++ b/sys/ufs/ufs/ufs_readwrite.c @@ -395,7 +395,7 @@ WRITE(ap) register struct inode *ip; register FS *fs; struct buf *bp; - struct proc *p; + struct thread *td; ufs_daddr_t lbn; off_t osize; int seqcount; @@ -456,13 +456,13 @@ WRITE(ap) * Maybe this should be above the vnode op call, but so long as * file servers have no limits, I don't think it matters. */ - p = uio->uio_procp; - if (vp->v_type == VREG && p && + td = uio->uio_td; + if (vp->v_type == VREG && td && uio->uio_offset + uio->uio_resid > - p->p_rlimit[RLIMIT_FSIZE].rlim_cur) { - PROC_LOCK(p); - psignal(p, SIGXFSZ); - PROC_UNLOCK(p); + td->td_proc->p_rlimit[RLIMIT_FSIZE].rlim_cur) { + PROC_LOCK(td->td_proc); + psignal(td->td_proc, SIGXFSZ); + PROC_UNLOCK(td->td_proc); if (object) { vm_object_vndeallocate(object); } @@ -573,7 +573,7 @@ WRITE(ap) if (error) { if (ioflag & IO_UNIT) { (void)UFS_TRUNCATE(vp, osize, - ioflag & IO_SYNC, ap->a_cred, uio->uio_procp); + ioflag & IO_SYNC, ap->a_cred, uio->uio_td); uio->uio_offset -= resid - uio->uio_resid; uio->uio_resid = resid; } |