From patchwork Wed Jan 14 22:56:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1523 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=1768431537; bh=eTlTSc9oCVC9OiS0yu+FI8QeKKmBJL3ohMJKjnHJhUM=; 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=HRvGfzmC0aQY3LJ3oWSwBl96LM8bP4IzSAvFh4QVmEbn7lwDsrKqZPVKBbLPYYOzc SR62rpXOYAHq7Al9p3hGIlvsGDwaC3OeEvJJFGmFN7tkUNXQw9oqdIQ70RkaFzHGuN 5cHsaKfsYPh2GprNZ4zXTxfM0FHM7t0TiRWeNOd/3peSxM3dhlTIXCjrazDoh9Fzbq Chxa/iXeEhpoKJ0M256Rvwj9NCi0mgCEuocGTcHcYBdSg7UrfIctBIUxnC6SCLqRSa QEM70yZ+PgtJsOWpE5N5FnEE13mJScK6rjaPd8yGDTgsKf7BgKWYftvLZgzpoYpJBZ L0UJkLNvZrYCg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 711B069360 for ; Wed, 14 Jan 2026 15:58:57 -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 ixBs7nbCvWKV for ; Wed, 14 Jan 2026 15:58:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431537; bh=eTlTSc9oCVC9OiS0yu+FI8QeKKmBJL3ohMJKjnHJhUM=; 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=HRvGfzmC0aQY3LJ3oWSwBl96LM8bP4IzSAvFh4QVmEbn7lwDsrKqZPVKBbLPYYOzc SR62rpXOYAHq7Al9p3hGIlvsGDwaC3OeEvJJFGmFN7tkUNXQw9oqdIQ70RkaFzHGuN 5cHsaKfsYPh2GprNZ4zXTxfM0FHM7t0TiRWeNOd/3peSxM3dhlTIXCjrazDoh9Fzbq Chxa/iXeEhpoKJ0M256Rvwj9NCi0mgCEuocGTcHcYBdSg7UrfIctBIUxnC6SCLqRSa QEM70yZ+PgtJsOWpE5N5FnEE13mJScK6rjaPd8yGDTgsKf7BgKWYftvLZgzpoYpJBZ L0UJkLNvZrYCg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 602F7692EF for ; Wed, 14 Jan 2026 15:58:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431535; bh=jTcgBaVQch5maFvaIFh4qplYOUeFHhUBBT+w88gIpA0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ggazi0KJoEtIA+MJ08+gn7BHt8q4dcUoKcpPf7sIDEkek3kCtWrQ9F9ZvDag4z5zc Tf7eAQfT5KxV+Cl1FS/ywn3OkYPXa8FJTRKyIA8OdSWclMnk1vuYggdZJNBuR5L/oV Ho28btj7i/wLMtNJ1xx1WRwB4SNI8BBTKLC+QuJ26qQfe7W1G5C2Bu0okYIbXqjn8C l8Qj9Uwi/874ADsrS8j7eTo/Gy5VHuzjNv5W6o26hfJmDAmR+DmB6DMACHJBsY2dkl TVUyCJoRQFj4/2pOx4prfJzNHC5mTRhDJvMTRmWjwld6Ui0wSTNPZbKQ0eSEZ6/3Dg 6qKBKONmk9sTA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9143D692EF; Wed, 14 Jan 2026 15:58:55 -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 EsXRt01TpIUp; Wed, 14 Jan 2026 15:58:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431530; bh=xJ8Pg1Z7ai56kPo3XgsSeHet3BDDP+1YQvEn23H9ywA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gagKvmysvnR0hXHoMomRNzmTqL+kst1vYMSSDAMwAhIjEEDAgeHwWkrr+zL52R2ey Q6ct95hkSqJvZNoo+Ps5F80ZtPro7cxRuT0jJX/5UNOtCyQB+shmiODKL0ddPaWN25 q/SLCxhMxve8xf+EyGNjPTrccBNM0VgvAchiuz5s7NRZOW3D2LBd+KISz9PH+wuJus REW79aZKEfIvAHPbOBm08cSc3Q+0/euLWILa7qM+TaM3WIkkUOAkkdxXhXrk8Gd2h8 s9iKvMXqrdGolshpzKJXlHudzCe9kexNi4WyKmH9KDZyiC733VhmLX7hUIOaXBCJde B9dU1GPMCPtvg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 50FCA6913F; Wed, 14 Jan 2026 15:58:50 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 14 Jan 2026 15:56:19 -0700 Message-ID: <20260114225635.3407989-30-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114225635.3407989-1-sjg@u-boot.org> References: <20260114225635.3407989-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RSEUEJCZU3O554BA5DURRJO6IKVS2QJK X-Message-ID-Hash: RSEUEJCZU3O554BA5DURRJO6IKVS2QJK 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 29/34] ext4l: Move S_* inode flags 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 Move the inode attribute flags (S_SYNC, S_NOATIME, S_APPEND, S_IMMUTABLE, S_DAX, S_DIRSYNC, S_ENCRYPTED, S_CASEFOLD, S_VERITY) and the permission constant S_IRWXUGO from ext4_uboot.h to linux/fs.h where they belong alongside other filesystem definitions. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 15 ++------------- include/linux/fs.h | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index cc0cb48fc24..2ed5a5d4984 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -589,19 +589,8 @@ static inline int bdev_read_only(struct block_device *bdev) #define I_FREEING (1 << 1) #define I_DIRTY_DATASYNC (1 << 2) -/* Inode flags for i_flags */ -#define S_SYNC 1 -#define S_NOATIME 2 -#define S_APPEND 4 -#define S_IMMUTABLE 8 -#define S_DAX 16 -#define S_DIRSYNC 32 -#define S_ENCRYPTED 64 -#define S_CASEFOLD 128 -#define S_VERITY 256 - -/* Permission mode constants */ -#define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) +/* S_SYNC, S_NOATIME, etc. inode flags are in linux/fs.h */ +/* S_IRWXUGO is in linux/fs.h */ /* Whiteout mode for overlayfs */ #define WHITEOUT_DEV 0 diff --git a/include/linux/fs.h b/include/linux/fs.h index 7963e931fad..2b05c39e88a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -173,6 +173,20 @@ static inline void inode_init_once(struct inode *inode) /* S_ISDIR, etc. - already in linux/stat.h */ #include +/* Inode flags for i_flags field */ +#define S_SYNC 1 /* Synchronous writes */ +#define S_NOATIME 2 /* No access time updates */ +#define S_APPEND 4 /* Append only */ +#define S_IMMUTABLE 8 /* Immutable file */ +#define S_DAX 16 /* Direct access */ +#define S_DIRSYNC 32 /* Directory sync */ +#define S_ENCRYPTED 64 /* Encrypted */ +#define S_CASEFOLD 128 /* Case-folded */ +#define S_VERITY 256 /* Verity enabled */ + +/* Permission mode constants */ +#define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) + /* Directory entry types */ #define DT_UNKNOWN 0 #define DT_FIFO 1