[Concept,30/34] ext4l: Move S_IRUGO to linux/fs.h

Message ID 20260114225635.3407989-31-sjg@u-boot.org
State New
Headers
Series ext4l: Clean up ext4_uboot.h by moving definitions to standard headers |

Commit Message

Simon Glass Jan. 14, 2026, 10:56 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the S_IRUGO permission constant to linux/fs.h alongside S_IRWXUGO.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 fs/ext4l/ext4_uboot.h | 5 +----
 include/linux/fs.h    | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 2ed5a5d4984..5f3fcaae30b 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -2524,10 +2524,7 @@  struct proc_ops {
 ssize_t seq_read(struct file *f, char *b, size_t s, loff_t *p);
 loff_t seq_lseek(struct file *f, loff_t o, int w);
 
-/* S_IRUGO file mode if not defined */
-#ifndef S_IRUGO
-#define S_IRUGO		(S_IRUSR | S_IRGRP | S_IROTH)
-#endif
+/* S_IRUGO is in linux/fs.h */
 
 /* procfs stubs */
 #define proc_mkdir(name, parent)	({ (void)(name); (void)(parent); (struct proc_dir_entry *)NULL; })
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2b05c39e88a..25966447cf2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -186,6 +186,7 @@  static inline void inode_init_once(struct inode *inode)
 
 /* Permission mode constants */
 #define S_IRWXUGO	(S_IRWXU | S_IRWXG | S_IRWXO)
+#define S_IRUGO		(S_IRUSR | S_IRGRP | S_IROTH)
 
 /* Directory entry types */
 #define DT_UNKNOWN	0