diff options
author | trasz <trasz@FreeBSD.org> | 2010-05-05 16:44:25 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2010-05-05 16:44:25 +0000 |
commit | 402e3baadee30786a2a2fa508b9b7bec572da072 (patch) | |
tree | a3e31897fa4432edd5136dad2f999d5ce286bc3c /sys/gnu/fs | |
parent | a3da7d7e6937462db7db7ba830332b719a5a46fa (diff) | |
download | FreeBSD-src-402e3baadee30786a2a2fa508b9b7bec572da072.zip FreeBSD-src-402e3baadee30786a2a2fa508b9b7bec572da072.tar.gz |
Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().
Reviewed by: kib
Diffstat (limited to 'sys/gnu/fs')
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c index 20be557..b935b64 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c @@ -598,16 +598,8 @@ xfs_write_file(xfs_inode_t *xip, struct uio *uio, int ioflag) */ #if 0 td = uio->uio_td; - if (vp->v_type == VREG && td != NULL) { - PROC_LOCK(td->td_proc); - 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); - } + if (vn_rlimit_fsize(vp, uio, uio->uio_td)) + return (EFBIG); #endif resid = uio->uio_resid; |