[Concept,24/26] fs: ext4l: Mount filesystems read-only

Message ID 20251222115639.700578-25-sjg@u-boot.org
State New
Headers
Series fs: ext4l: Add support for mounting ext4 filesystems (part G) |

Commit Message

Simon Glass Dec. 22, 2025, 11:56 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Set sb_rdonly() to return 1 since U-Boot currently only supports
read-only filesystem access.

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

 fs/ext4l/ext4_uboot.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 8b70bbcb75c..5beedb4bb3d 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -289,8 +289,8 @@  extern struct user_namespace init_user_ns;
 /* might_sleep - stub */
 #define might_sleep()	do { } while (0)
 
-/* sb_rdonly - stub */
-#define sb_rdonly(sb)	(0)
+/* sb_rdonly - for now U-Boot mounts filesystems read-only */
+#define sb_rdonly(sb)	1
 
 /* Trace stubs */
 #define trace_ext4_journal_start_inode(...)	do { } while (0)