for kernel I/O, may not have a proc from which to check rlimits
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sun, 12 May 1991 09:11:42 +0000 (01:11 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sun, 12 May 1991 09:11:42 +0000 (01:11 -0800)
SCCS-vsn: sys/ufs/ffs/ffs_vnops.c 7.62
SCCS-vsn: sys/ufs/ffs/ufs_vnops.c 7.62
SCCS-vsn: sys/ufs/lfs/lfs_vnops.c 7.62
SCCS-vsn: sys/ufs/ufs/ufs_vnops.c 7.62

usr/src/sys/ufs/ffs/ffs_vnops.c
usr/src/sys/ufs/ffs/ufs_vnops.c
usr/src/sys/ufs/lfs/lfs_vnops.c
usr/src/sys/ufs/ufs/ufs_vnops.c

index 5b8f299..905546b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ffs_vnops.c 7.61 (Berkeley) %G%
+ *     @(#)ffs_vnops.c 7.62 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -523,7 +523,7 @@ ufs_write(vp, uio, ioflag, cred)
         * Maybe this should be above the vnode op call, but so long as
         * file servers have no limits, i don't think it matters
         */
         * 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 (vp->v_type == VREG &&
+       if (vp->v_type == VREG && p &&
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
index 9909591..242dc9b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ufs_vnops.c 7.61 (Berkeley) %G%
+ *     @(#)ufs_vnops.c 7.62 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -523,7 +523,7 @@ ufs_write(vp, uio, ioflag, cred)
         * Maybe this should be above the vnode op call, but so long as
         * file servers have no limits, i don't think it matters
         */
         * 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 (vp->v_type == VREG &&
+       if (vp->v_type == VREG && p &&
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
index a90f58e..44cf668 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)lfs_vnops.c 7.61 (Berkeley) %G%
+ *     @(#)lfs_vnops.c 7.62 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -523,7 +523,7 @@ ufs_write(vp, uio, ioflag, cred)
         * Maybe this should be above the vnode op call, but so long as
         * file servers have no limits, i don't think it matters
         */
         * 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 (vp->v_type == VREG &&
+       if (vp->v_type == VREG && p &&
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
index 9909591..242dc9b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)ufs_vnops.c 7.61 (Berkeley) %G%
+ *     @(#)ufs_vnops.c 7.62 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -523,7 +523,7 @@ ufs_write(vp, uio, ioflag, cred)
         * Maybe this should be above the vnode op call, but so long as
         * file servers have no limits, i don't think it matters
         */
         * 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 (vp->v_type == VREG &&
+       if (vp->v_type == VREG && p &&
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);
            uio->uio_offset + uio->uio_resid >
              p->p_rlimit[RLIMIT_FSIZE].rlim_cur) {
                psignal(p, SIGXFSZ);