From patchwork Mon Jan 19 06:15:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1630 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803451; bh=pG8iiFwaKbJnoBjLBW4oOrjvUZZ3jBRs5nDtxdYtsvE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Km5JVXPxNR1YW1tKFszU0d6INUA+xwZdq8TvnM7zXZpEZQccGJDPNHD7zNXcwMaBd FJkPB3zOaEGXqBDZ9nVQLST/nMC34qHulySb5E5iOt+/JQ8LNHauNVCAjbFGkSXQn5 Jup1SfYtoY6iZb4EjAY8YgrQNTwoUWtLzAqbINaN/Gn3Bauev/ylZ7mcnk6j6ewBb9 2GTcGRWNE3EN/bzaXDijscilrVNw7JPtZMKWYptcRs0QTN617Gj5YabDwSSM6QlmwK CvXCa6UiGFQZCHtEuxtmV4UlqppXInOpmWmU+JYS2k3Yp7Wp2uOW9+siS2JtT4OQ47 vq1Sr9d07cz1g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A1FD0694DD for ; Sun, 18 Jan 2026 23:17:31 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id O-7Erz5veo4J for ; Sun, 18 Jan 2026 23:17:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803451; bh=pG8iiFwaKbJnoBjLBW4oOrjvUZZ3jBRs5nDtxdYtsvE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Km5JVXPxNR1YW1tKFszU0d6INUA+xwZdq8TvnM7zXZpEZQccGJDPNHD7zNXcwMaBd FJkPB3zOaEGXqBDZ9nVQLST/nMC34qHulySb5E5iOt+/JQ8LNHauNVCAjbFGkSXQn5 Jup1SfYtoY6iZb4EjAY8YgrQNTwoUWtLzAqbINaN/Gn3Bauev/ylZ7mcnk6j6ewBb9 2GTcGRWNE3EN/bzaXDijscilrVNw7JPtZMKWYptcRs0QTN617Gj5YabDwSSM6QlmwK CvXCa6UiGFQZCHtEuxtmV4UlqppXInOpmWmU+JYS2k3Yp7Wp2uOW9+siS2JtT4OQ47 vq1Sr9d07cz1g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8FC6A694CE for ; Sun, 18 Jan 2026 23:17:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803449; bh=xAyBSa/Nj8x9Yu7145OxzYw3KdHYgYrreSoSlnDFCQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HOshhVfMoDuRreojQOX2t5fss3huAapHxa/gLdNs8nmQal5h0MP1kMoyWl8iYxsq7 ASUEAHIeLrqn+xS8zpFhu160NpZrY/qZCBlX/YHv0g704WdY4pvqvtUFONxqugGPkg qTL8Xls70Dh4AmoskqvIIE2wppvUt7McCSwoyZnD7bWypa+unBnDQlCy+VsQ6iHbp7 LrVx8fiGwVX6kyw+dRtzW3s9IM/IATUWHpQ8xZT2XgHhlLF9dNM5sM15QtxkLzwP74 Jc0QDiNdj5MMtX6E8/Vc5foHqM2JXau3kdenQv4iw7Q2mH2mo5G1neTQJKvtbSAvjg DbCpXbWroppIQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 82AA9693AE; Sun, 18 Jan 2026 23:17:29 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id w3pZ8Zm8HZY9; Sun, 18 Jan 2026 23:17:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803444; bh=I6oSCMhMoBrgA7qKptTDzPaj1stgHQezLCoFDey8R88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JEGQhowq4T/sx0Q1UBuAlT45fZvoGryeOebaF9YmIiF+csv1orYSmlsbv17RyWoVc fVDxOSWi4WEeJ/Y+O2eFmPdOCzGTVLoahPixqPdIHzswLwZK4KvSgL/BLEDF5x3dlD lAVSS6MAbioyVgM/1keuuEwbU7nnPIs1390/q2cT3GF6d9dmpSInI8q0x1ZPYr+URR e+k8nO5PJZobKTfX0U5Iecr370w8cWBJ1HY9kb9Odc7EftuyiPR0IdJbRnPcZ6xpia VIe/iKfVR1cHdmkaF9Z5lKbRM7k8TcYZWLTWFY7UvsSEbS2lB8P+Z1qRrMkj2davz+ O+77D9PD9Q+xQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D03B2694C0; Sun, 18 Jan 2026 23:17:23 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 18 Jan 2026 23:15:21 -0700 Message-ID: <20260119061529.3383191-24-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119061529.3383191-1-sjg@u-boot.org> References: <20260119061529.3383191-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: L22KJRZ7YJDRS27JSMKYTBPSSC76MF5D X-Message-ID-Hash: L22KJRZ7YJDRS27JSMKYTBPSSC76MF5D X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 23/23] ext4l: Move I_MUTEX_* constants to linux/fs.h List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add the inode mutex nesting classes (I_MUTEX_NORMAL, I_MUTEX_PARENT, I_MUTEX_CHILD, I_MUTEX_XATTR, etc.) to include/linux/fs.h where they belong with other filesystem-related definitions, matching Linux kernel organisation. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 6 +----- include/linux/fs.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index f3b1aaaa408..ba462af45e4 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1344,11 +1344,7 @@ static inline void super_set_uuid(struct super_block *sb, const u8 *uuid, #define xattr_handler_can_list(h, d) ({ (void)(h); (void)(d); 0; }) #define xattr_prefix(h) ({ (void)(h); (const char *)NULL; }) -/* Inode lock mutex classes */ -#define I_MUTEX_XATTR 5 -#define I_MUTEX_CHILD 4 -#define I_MUTEX_PARENT 3 -#define I_MUTEX_NORMAL 2 +/* I_MUTEX_* inode lock classes are in linux/fs.h */ /* Nested inode locking stub */ #define inode_lock_nested(i, c) do { (void)(i); (void)(c); } while (0) diff --git a/include/linux/fs.h b/include/linux/fs.h index 28b57b59484..5c357cdacd2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -260,4 +260,14 @@ static inline bool dir_emit(struct dir_context *ctx, const char *name, int len, #define dir_relax_shared(i) ({ (void)(i); 1; }) +/* Inode mutex nesting classes */ +enum { + I_MUTEX_NORMAL, + I_MUTEX_PARENT, + I_MUTEX_CHILD, + I_MUTEX_XATTR, + I_MUTEX_NONDIR2, + I_MUTEX_PARENT2, +}; + #endif /* _LINUX_FS_H */