diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2004-02-04 21:52:57 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2004-02-04 21:52:57 +0000 |
| commit | 91d5354a2ce810d848eca6ecf9da1027aeb2be6d (patch) | |
| tree | d9c0a05d62914174d6f00ab22300e935c3e6d983 /sys/gnu/ext2fs/ext2_readwrite.c | |
| parent | 890cefab5b3dd6f2a1fbfffae44730a0434b2e84 (diff) | |
Notes
Diffstat (limited to 'sys/gnu/ext2fs/ext2_readwrite.c')
| -rw-r--r-- | sys/gnu/ext2fs/ext2_readwrite.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c index ba798354f347..c40ae9898581 100644 --- a/sys/gnu/ext2fs/ext2_readwrite.c +++ b/sys/gnu/ext2fs/ext2_readwrite.c @@ -217,15 +217,15 @@ WRITE(ap) * file servers have no limits, I don't think it matters. */ td = uio->uio_td; - /* For p_rlimit. */ - mtx_assert(&Giant, MA_OWNED); - if (vp->v_type == VREG && td && - uio->uio_offset + uio->uio_resid > - td->td_proc->p_rlimit[RLIMIT_FSIZE].rlim_cur) { + if (vp->v_type == VREG && td != NULL) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGXFSZ); + if (uio->uio_offset + uio->uio_resid > + lim_cur(td->td_proc, RLIMIT_FSIZE)) { + psignal(td->td_proc, SIGXFSZ); + PROC_UNLOCK(td->td_proc); + return (EFBIG); + } PROC_UNLOCK(td->td_proc); - return (EFBIG); } resid = uio->uio_resid; |
