diff options
author | dyson <dyson@FreeBSD.org> | 1996-10-17 02:49:35 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-10-17 02:49:35 +0000 |
commit | 576dd5e9f61048e157385203efbf83c1d9afac6f (patch) | |
tree | 9cf99cb31ad6e94cfc13475d7e5331f9cab548f0 /sys/vm | |
parent | 9b6c3e888dab05dfe60b3ee68b90e7b90b64b68e (diff) | |
download | FreeBSD-src-576dd5e9f61048e157385203efbf83c1d9afac6f.zip FreeBSD-src-576dd5e9f61048e157385203efbf83c1d9afac6f.tar.gz |
Clean up the rundown of the object backing a vnode. This should fix
NFS problems associated with forcible dismounts.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.h | 3 | ||||
-rw-r--r-- | sys/vm/vnode_pager.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index e62a14b..4a19888 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.h,v 1.31 1996/09/28 03:33:31 dyson Exp $ + * $Id: vm_object.h,v 1.32 1996/10/15 18:23:38 bde Exp $ */ /* @@ -133,6 +133,7 @@ struct vm_object { #define OBJ_VFS_REF 0x0400 /* object is refed by vfs layer */ +#define OBJ_VNODE_GONE 0x0800 /* vnode is gone */ #define OBJ_NORMAL 0x0 /* default behavior */ #define OBJ_SEQUENTIAL 0x1 /* expect sequential accesses */ #define OBJ_RANDOM 0x2 /* expect random accesses */ diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 6f31dd3..7581086 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * from: @(#)vnode_pager.c 7.5 (Berkeley) 4/20/91 - * $Id: vnode_pager.c,v 1.63 1996/08/21 21:56:23 dyson Exp $ + * $Id: vnode_pager.c,v 1.64 1996/09/10 05:28:23 dyson Exp $ */ /* @@ -614,6 +614,8 @@ vnode_pager_getpages(object, m, count, reqpage) { int rtval; struct vnode *vp; + if (object->flags & OBJ_VNODE_GONE) + return VM_PAGER_ERROR; vp = object->handle; rtval = VOP_GETPAGES(vp, m, count*PAGE_SIZE, reqpage, 0); if (rtval == EOPNOTSUPP) @@ -857,6 +859,10 @@ vnode_pager_putpages(object, m, count, sync, rtvals) { int rtval; struct vnode *vp; + + if (object->flags & OBJ_VNODE_GONE) + return VM_PAGER_ERROR; + vp = object->handle; rtval = VOP_PUTPAGES(vp, m, count*PAGE_SIZE, sync, rtvals, 0); if (rtval == EOPNOTSUPP) |