diff options
| author | Matthew Dillon <dillon@FreeBSD.org> | 1999-02-04 18:25:39 +0000 |
|---|---|---|
| committer | Matthew Dillon <dillon@FreeBSD.org> | 1999-02-04 18:25:39 +0000 |
| commit | 82b23b5384e4d83a8525a3a895ce4b7a0398b2b9 (patch) | |
| tree | 015606d13758a75e82c9ecf4df393a3397b0bbfb /sys/kern/vfs_subr.c | |
| parent | 431552d221bbb70c16eb8f2d45efa7adf477ffcf (diff) | |
Notes
Diffstat (limited to 'sys/kern/vfs_subr.c')
| -rw-r--r-- | sys/kern/vfs_subr.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4bebc5e844aa..6cf879dd7740 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 - * $Id: vfs_subr.c,v 1.184 1999/01/28 00:57:47 dillon Exp $ + * $Id: vfs_subr.c,v 1.185 1999/01/29 23:18:49 dillon Exp $ */ /* @@ -2555,7 +2555,13 @@ retry: * cause any problems (yet). */ object = vnode_pager_alloc(vp, IDX_TO_OFF(INT_MAX), 0, 0); + } else { + goto retn; } + /* + * Dereference the reference we just created. This assumes + * that the object is associated with the vp. + */ object->ref_count--; vp->v_usecount--; } else { @@ -2567,8 +2573,8 @@ retry: } } - if (vp->v_object) - vp->v_flag |= VOBJBUF; + KASSERT(vp->v_object != NULL, ("vfs_object_create: NULL object")); + vp->v_flag |= VOBJBUF; retn: return error; |
