Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160310914
D57096.id178112.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
710 B
Referenced Files
None
Subscribers
None
D57096.id178112.diff
View Options
diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c
--- a/sys/fs/p9fs/p9fs_vnops.c
+++ b/sys/fs/p9fs/p9fs_vnops.c
@@ -740,10 +740,7 @@
return (error);
}
-/*
- * Close the open references. Just reduce the open count on vofid and return.
- * Let clunking of VOFID happen in p9fs_reclaim.
- */
+/* Close and clunk the open references. */
static int
p9fs_close(struct vop_close_args *ap)
{
@@ -772,7 +769,14 @@
if (vofid == NULL)
return (0);
- vofid->v_opens--;
+ /*
+ * Since p9fs_open reuses existing OFIDs,
+ * if v_opens is 0, no one is using this file.
+ */
+ if (--vofid->v_opens == 0) {
+ p9fs_fid_remove(np, vofid, VOFID);
+ p9_client_clunk(vofid);
+ }
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 3:29 AM (13 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33351571
Default Alt Text
D57096.id178112.diff (710 B)
Attached To
Mode
D57096: Close files that were opened by guest VM via 9pfs
Attached
Detach File
Event Timeline
Log In to Comment