git: 303bef2a0797 - stable/13 - cdev_del() should only put it's kernel object in the LinuxKPI.
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Jun 2 12:24:58 UTC 2021
The branch stable/13 has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=303bef2a07974e6573774e04fbdb0e7c8e2f07ca
commit 303bef2a07974e6573774e04fbdb0e7c8e2f07ca
Author: Hans Petter Selasky <hselasky at FreeBSD.org>
AuthorDate: 2021-05-11 18:51:35 +0000
Commit: Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2021-06-02 11:25:20 +0000
cdev_del() should only put it's kernel object in the LinuxKPI.
The destructor takes care of the rest.
Sponsored by: Mellanox Technologies // NVIDIA Networking
(cherry picked from commit 67807f5066a012254da9a4535c0f225377afb66d)
---
sys/compat/linuxkpi/common/include/linux/cdev.h | 4 ----
sys/compat/linuxkpi/common/src/linux_compat.c | 3 ++-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/cdev.h b/sys/compat/linuxkpi/common/include/linux/cdev.h
index 2a472da91866..bdfb7e76c9a7 100644
--- a/sys/compat/linuxkpi/common/include/linux/cdev.h
+++ b/sys/compat/linuxkpi/common/include/linux/cdev.h
@@ -135,13 +135,9 @@ cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t uid, gid_t gid, int mode)
return (0);
}
-void linux_destroy_dev(struct linux_cdev *);
-
static inline void
cdev_del(struct linux_cdev *cdev)
{
-
- linux_destroy_dev(cdev);
kobject_put(&cdev->kobj);
}
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index 8fe4f4509571..35535eb75abb 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -108,6 +108,7 @@ MALLOC_DEFINE(M_KMALLOC, "linux", "Linux kmalloc compat");
#undef cdev
#define RB_ROOT(head) (head)->rbh_root
+static void linux_destroy_dev(struct linux_cdev *);
static void linux_cdev_deref(struct linux_cdev *ldev);
static struct vm_area_struct *linux_cdev_handle_find(void *handle);
@@ -2234,7 +2235,7 @@ linux_cdev_static_release(struct kobject *kobj)
kobject_put(kobj->parent);
}
-void
+static void
linux_destroy_dev(struct linux_cdev *ldev)
{
More information about the dev-commits-src-branches
mailing list