From nobody Wed Feb 19 20:48:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YypPc2Clbz5nfHm; Wed, 19 Feb 2025 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YypPc1Br0z3Gbb; Wed, 19 Feb 2025 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739998084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x13Mh1FFupBYIh0a7tRhHEVfW8Zcgf3ixGQ95t/dANE=; b=Zyb8colWVnb9fJliA2srCqyr8s1nV+OKk+CPoEKKRZOG/bKZ8tz6ME+Ri3kRphXnogIEfq FLyMrBHTeV135eBeOZDHjR8fpMaOZS3J0xIJ9i7heurLy5bnQaTR6AjXwmmzzDhrPbYGZg CNlOE5+nkq09rlWM9tXjIoJFC8EaE4onNM1I/FRNjiJos8uUB+DLNU9PhqbESm7vSBdYQF uD7GkG3BrK/waeg5J6NJYOOyA1Cj/E5C3pCdjLOtrUneHrG3w2hYqDQ0RaXnQCW1Tj5glP Rq0grTwfYwR6daHUtK0CsjfKvMtZvoNSLMRkRQ7N61cghkSR7N+TodJVvVhfIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739998084; a=rsa-sha256; cv=none; b=Mf26fUpzwZnCqCSuQ9AvT18h02/Ulm+DFZC4r7siRN+P3XsG6Q8/oDJNBpsGl2+6CkpzI2 bBzZBJxwORYk4V2IKvKib8WDAHjjMGiL0tlnxNOmsTRS/b3rVixihJeT6ZRPrbMcUteYF3 Vc+laR9B69wH7bCm2OYYLOy8YFSFmG674oK5ab6ybljpvVbo8GI2st/aro3qiFi3UMtzRq G6tWYF27UIkAyVP67LmObJJLGY49oKY2mMKrY/gY6nanIqeo7IGuJ3PRut1d79VCTYQplV sh/2z9ZCIeqDciuEUfF4f+3Bxqn7KuHsjtTDzKSUmUpzaNgMnCG+nk8q08/nAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739998084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x13Mh1FFupBYIh0a7tRhHEVfW8Zcgf3ixGQ95t/dANE=; b=CWcfYJMxCQ06mjpuzacl9PnXLvM3E0FIK1anTI8GeviY8WEHwwr/ENQqWpAlomGlZp9MzQ c2aG2dxw/KThToRK2oa6OkzlkkpOJQg+igf9vfBZ4GOpRdu72O0ifHNewFbJV/fZeFOClx AY76KBpqrp8TsELeqR+KVIsim4g+btcoh/t96GzCu12Y7GpUfcltHNtGrzM2oRgazueq2H QwD4Uh86DZs2pj/eTp2aVWp1oW3UzoLhS1IB6N+4ijYWR+zmv9w6WCxB2VgjsSv4hYywzB Su1y2sMHuEfuRDNzLE5nAVvxyC0aKAru0ynxPW7Cu1emkwHHKFopJMuYrynWJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YypPc0SYpz50h; Wed, 19 Feb 2025 20:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51JKm3s7072004; Wed, 19 Feb 2025 20:48:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51JKm32Y072001; Wed, 19 Feb 2025 20:48:03 GMT (envelope-from git) Date: Wed, 19 Feb 2025 20:48:03 GMT Message-Id: <202502192048.51JKm32Y072001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien?= =?utf-8?Q?P=C3=A9dron?= Subject: git: 585cdb74f4a6 - main - linuxkpi: Defaults to `get_file_rcu()` version from Linux 6.7 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 585cdb74f4a6a578fc307ed5af940708c26acde4 Auto-Submitted: auto-generated The branch main has been updated by dumbbell: URL: https://cgit.FreeBSD.org/src/commit/?id=585cdb74f4a6a578fc307ed5af940708c26acde4 commit 585cdb74f4a6a578fc307ed5af940708c26acde4 Author: Jean-Sébastien Pédron AuthorDate: 2025-02-05 18:08:29 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2025-02-19 20:39:46 +0000 linuxkpi: Defaults to `get_file_rcu()` version from Linux 6.7 To use the old version, one has to explicitly set `LINUXKPI_VERSION` to the expected version of Linux KPI. Reported by: bz Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48860 --- sys/compat/linuxkpi/common/include/linux/fs.h | 8 ++++---- sys/compat/linuxkpi/common/src/linux_compat.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index 56de0e3e490a..76a81e676744 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -264,17 +264,17 @@ get_file(struct linux_file *f) return (f); } -struct linux_file * linux67_get_file_rcu(struct linux_file **f); +struct linux_file * linux_get_file_rcu(struct linux_file **f); struct linux_file * get_file_active(struct linux_file **f); -#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60700 -#define get_file_rcu(f) linux67_get_file_rcu(f) -#else +#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 60700 static inline bool get_file_rcu(struct linux_file *f) { return (refcount_acquire_if_not_zero( f->_file == NULL ? &f->f_count : &f->_file->f_count)); } +#else +#define get_file_rcu(f) linux_get_file_rcu(f) #endif static inline struct inode * diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 3e2938ab2c2b..af6cc01d8020 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1105,7 +1105,7 @@ __get_file_rcu(struct linux_file **f) } struct linux_file * -linux67_get_file_rcu(struct linux_file **f) +linux_get_file_rcu(struct linux_file **f) { struct linux_file *file1;