diff options
author | Ian Moffett <ian@osmora.org> | 2025-06-21 15:39:06 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-06-21 15:39:06 -0400 |
commit | 09faea731b9f1b01caf8f08761e0937724804558 (patch) | |
tree | 13846e623c7f3f1c6faf86b8273d1141f320aa2b /sys/fs | |
parent | fe401d258f7dcb91f905f8becd1f36960db9af8b (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/ctlfs.c | 20 |
1 files changed, 1 insertions, 19 deletions
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; } |