summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2010-05-05 16:44:25 +0000
committertrasz <trasz@FreeBSD.org>2010-05-05 16:44:25 +0000
commit402e3baadee30786a2a2fa508b9b7bec572da072 (patch)
treea3e31897fa4432edd5136dad2f999d5ce286bc3c /sys/gnu
parenta3da7d7e6937462db7db7ba830332b719a5a46fa (diff)
downloadFreeBSD-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')
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c12
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;
OpenPOWER on IntegriCloud