Date: Wed, 29 Sep 2021 20:27:35 GMT From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7d92d4835850 - main - LinuxKPI: Invoke release handler when file is destroyed by fput() Message-ID: <202109292027.18TKRZcq038573@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7d92d4835850fdc5c1ec1fa7c5634826a61ad0a5 commit 7d92d4835850fdc5c1ec1fa7c5634826a61ad0a5 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2021-09-29 20:13:27 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2021-09-29 20:13:27 +0000 LinuxKPI: Invoke release handler when file is destroyed by fput() Required by drm_kmod 5.6 Reviewed by: hselasky, manu MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D32067 --- sys/compat/linuxkpi/common/src/linux_compat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 8e3a3ea52ff1..103d7ab0c60b 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -471,6 +471,8 @@ void linux_file_free(struct linux_file *filp) { if (filp->_file == NULL) { + if (filp->f_op != NULL && filp->f_op->release != NULL) + filp->f_op->release(filp->f_vnode, filp); if (filp->f_shmem != NULL) vm_object_deallocate(filp->f_shmem); kfree_rcu(filp, rcu);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109292027.18TKRZcq038573>