summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs/msdosfs_vnops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/msdosfs/msdosfs_vnops.c')
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index e9c593b..f38c72b 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -61,9 +61,6 @@
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/priv.h>
-#include <sys/proc.h>
-#include <sys/resourcevar.h>
-#include <sys/signalvar.h>
#include <sys/stat.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
@@ -699,16 +696,8 @@ msdosfs_write(ap)
/*
* If they've exceeded their filesize limit, tell them about it.
*/
- if (td != NULL) {
- PROC_LOCK(td->td_proc);
- if ((uoff_t)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, td))
+ return (EFBIG);
/*
* If the offset we are starting the write at is beyond the end of
OpenPOWER on IntegriCloud