diff options
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 04a63b0..d6a8f15 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -809,14 +809,17 @@ restart: * Maybe this should be above the vnode op call, but so long as * file servers have no limits, i don't think it matters */ - if (p && uio->uio_offset + uio->uio_resid > - p->p_rlimit[RLIMIT_FSIZE].rlim_cur) { + if (p != NULL) { PROC_LOCK(p); - psignal(p, SIGXFSZ); + if (uio->uio_offset + uio->uio_resid > + lim_cur(p, RLIMIT_FSIZE)) { + psignal(p, SIGXFSZ); + PROC_UNLOCK(p); + if (haverslock) + nfs_rsunlock(np, td); + return (EFBIG); + } PROC_UNLOCK(p); - if (haverslock) - nfs_rsunlock(np, td); - return (EFBIG); } biosize = vp->v_mount->mnt_stat.f_iosize; |