[Concept,15/23] ext4l: Move QFMT_VFS_* constants to quotaops.h

Message ID 20260119061529.3383191-16-sjg@u-boot.org
State New
Headers
Series Reduce ext4_uboot.h by moving definitions to linux headers |

Commit Message

Simon Glass Jan. 19, 2026, 6:15 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the quota format identifiers (QFMT_VFS_OLD, QFMT_VFS_V0,
QFMT_VFS_V1) to include/linux/quotaops.h with other quota definitions.

This consolidates quota-related constants in one location.

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/quotaops.h | 5 +++++
 2 files changed, 6 insertions(+), 4 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 03534115e71..d11981a858a 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -1092,10 +1092,7 @@  static inline const char *simple_get_link(struct dentry *dentry,
  * Additional stubs for super.c
  */
 
-/* Quota format constants */
-#define QFMT_VFS_OLD		1
-#define QFMT_VFS_V0		2
-#define QFMT_VFS_V1		4
+/* QFMT_VFS_* quota format constants are in linux/quotaops.h */
 
 /* Buffer read sync */
 static inline void end_buffer_read_sync(struct buffer_head *bh, int uptodate)
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index b32e7b7ab70..b96e33887b8 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -61,6 +61,11 @@  struct super_block;
 #define dquot_writeback_dquots(sb, type)	do { (void)(sb); (void)(type); } while (0)
 #define dquot_file_open(inode, file)		({ (void)(inode); (void)(file); 0; })
 
+/* Quota format identifiers */
+#define QFMT_VFS_OLD		1	/* Original quota format */
+#define QFMT_VFS_V0		2	/* 32-bit UID/GID quota */
+#define QFMT_VFS_V1		4	/* 32-bit UID/GID with grace period */
+
 /* Quota status queries */
 #define sb_has_quota_usage_enabled(sb, type)	0
 #define sb_has_quota_limits_enabled(sb, type)	0