summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Pierre André <jpandre@users.sourceforge.net>2012-08-22 10:00:22 +0200
committerJean-Pierre André <jpandre@users.sourceforge.net>2012-08-22 10:00:22 +0200
commitf5c4e71525e6e7289e0f771639a9d3a484d45efb (patch)
tree755e601d68b52fa0c210d1538abe221471952c15
parent50ef4d88a5478f208af3fee991bb94e5ddbd9a83 (diff)
downloadillumos-fusefs-f5c4e71525e6e7289e0f771639a9d3a484d45efb.tar.gz
Made sure not to free vnodes with cached pages
-rw-r--r--kernel/fuse_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/fuse_vnops.c b/kernel/fuse_vnops.c
index 682d073..bffcbba 100644
--- a/kernel/fuse_vnops.c
+++ b/kernel/fuse_vnops.c
@@ -2976,7 +2976,8 @@ fuse_vnode_free(struct vnode *vp, fuse_session_t *sep)
}
vp->v_data = NULL;
- vn_free(vp);
+ if (!vn_has_cached_data(vp)) /* be safe : better leak than corruption */
+ vn_free(vp);
}
/*