Page MenuHomeFreeBSD

D57096.id178112.diff
No OneTemporary

D57096.id178112.diff

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

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)

Event Timeline