From 09faea731b9f1b01caf8f08761e0937724804558 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 21 Jun 2025 15:39:06 -0400 Subject: kernel: ctlfs: Do not reclaim ctlfs entries There will likely be multiple times the reference count of a ctlfs entry will hit zero. Several programs may open and close a ctlfs node more than once and as these are hardwired kernel objects, they must always stay present. At the most we may set the vp->data field to NULL, indicating that it is currently unused. Signed-off-by: Ian Moffett --- sys/fs/ctlfs.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'sys/fs/ctlfs.c') diff --git a/sys/fs/ctlfs.c b/sys/fs/ctlfs.c index efbf448..64d3a1a 100644 --- a/sys/fs/ctlfs.c +++ b/sys/fs/ctlfs.c @@ -371,25 +371,7 @@ ctlfs_read(struct vnode *vp, struct sio_txn *sio) static int ctlfs_reclaim(struct vnode *vp) { - struct ctlfs_hdr *hp; - - if (vp->data == NULL) { - return 0; - } - - /* Ensure the magic is correct */ - hp = vp->data; - switch (hp->magic) { - case CTLFS_NODE_MAG: - case CTLFS_ENTRY_MAG: - dynfree(hp->name); - break; - default: - pr_error("reclaim: bad magic in vp\n"); - break; - } - - dynfree(vp->data); + vp->data = NULL; return 0; } -- cgit v1.2.3