]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
uapi: promote EFSCORRUPTED and EUCLEAN to errno.h
authorDarrick J. Wong <djwong@kernel.org>
Tue, 13 Jan 2026 00:31:09 +0000 (16:31 -0800)
committerChristian Brauner <brauner@kernel.org>
Tue, 13 Jan 2026 08:58:01 +0000 (09:58 +0100)
Stop definining these privately and instead move them to the uapi
errno.h so that they become canonical instead of copy pasta.

Cc: linux-api@vger.kernel.org
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://patch.msgid.link/176826402587.3490369.17659117524205214600.stgit@frogsfrogsfrogs
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
18 files changed:
arch/alpha/include/uapi/asm/errno.h
arch/mips/include/uapi/asm/errno.h
arch/parisc/include/uapi/asm/errno.h
arch/sparc/include/uapi/asm/errno.h
fs/erofs/internal.h
fs/ext2/ext2.h
fs/ext4/ext4.h
fs/f2fs/f2fs.h
fs/minix/minix.h
fs/udf/udf_sb.h
fs/xfs/xfs_linux.h
include/linux/jbd2.h
include/uapi/asm-generic/errno.h
tools/arch/alpha/include/uapi/asm/errno.h
tools/arch/mips/include/uapi/asm/errno.h
tools/arch/parisc/include/uapi/asm/errno.h
tools/arch/sparc/include/uapi/asm/errno.h
tools/include/uapi/asm-generic/errno.h

index 3d265f6babaf0a10f2c2baa67c46bb4ca52e1bef..6791f6508632ee67ad0c3ba363767e04e0f0bfb4 100644 (file)
@@ -55,6 +55,7 @@
 #define        ENOSR           82      /* Out of streams resources */
 #define        ETIME           83      /* Timer expired */
 #define        EBADMSG         84      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EPROTO          85      /* Protocol error */
 #define        ENODATA         86      /* No data available */
 #define        ENOSTR          87      /* Device not a stream */
@@ -96,6 +97,7 @@
 #define        EREMCHG         115     /* Remote address changed */
 
 #define        EUCLEAN         117     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         118     /* Not a XENIX named type file */
 #define        ENAVAIL         119     /* No XENIX semaphores available */
 #define        EISNAM          120     /* Is a named type file */
index 2fb714e2d6d8fcd41806d84e41b3e6f0edc04b7f..c01ed91b1ef44b8962297c6449ce0718bc1475eb 100644 (file)
@@ -50,6 +50,7 @@
 #define EDOTDOT                73      /* RFS specific error */
 #define EMULTIHOP      74      /* Multihop attempted */
 #define EBADMSG                77      /* Not a data message */
+#define EFSBADCRC      EBADMSG /* Bad CRC detected */
 #define ENAMETOOLONG   78      /* File name too long */
 #define EOVERFLOW      79      /* Value too large for defined data type */
 #define ENOTUNIQ       80      /* Name not unique on network */
@@ -88,6 +89,7 @@
 #define EISCONN                133     /* Transport endpoint is already connected */
 #define ENOTCONN       134     /* Transport endpoint is not connected */
 #define EUCLEAN                135     /* Structure needs cleaning */
+#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
 #define ENOTNAM                137     /* Not a XENIX named type file */
 #define ENAVAIL                138     /* No XENIX semaphores available */
 #define EISNAM         139     /* Is a named type file */
index 8d94739d75c67c80fbea76fe3b5c08f1f8b1ea83..8cbc07c1903e4c332a0a3a48c5ec14e4ae59f450 100644 (file)
@@ -36,6 +36,7 @@
 
 #define        EDOTDOT         66      /* RFS specific error */
 #define        EBADMSG         67      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EUSERS          68      /* Too many users */
 #define        EDQUOT          69      /* Quota exceeded */
 #define        ESTALE          70      /* Stale file handle */
@@ -62,6 +63,7 @@
 #define        ERESTART        175     /* Interrupted system call should be restarted */
 #define        ESTRPIPE        176     /* Streams pipe error */
 #define        EUCLEAN         177     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         178     /* Not a XENIX named type file */
 #define        ENAVAIL         179     /* No XENIX semaphores available */
 #define        EISNAM          180     /* Is a named type file */
index 81a732b902ee3838ba91c2bf136e65022f3a0036..4a41e7835fd5b8c21c058ae10739e4d5510a36c5 100644 (file)
@@ -48,6 +48,7 @@
 #define        ENOSR           74      /* Out of streams resources */
 #define        ENOMSG          75      /* No message of desired type */
 #define        EBADMSG         76      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EIDRM           77      /* Identifier removed */
 #define        EDEADLK         78      /* Resource deadlock would occur */
 #define        ENOLCK          79      /* No record locks available */
@@ -91,6 +92,7 @@
 #define        ENOTUNIQ        115     /* Name not unique on network */
 #define        ERESTART        116     /* Interrupted syscall should be restarted */
 #define        EUCLEAN         117     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         118     /* Not a XENIX named type file */
 #define        ENAVAIL         119     /* No XENIX semaphores available */
 #define        EISNAM          120     /* Is a named type file */
index f7f622836198daeda18b5da81a643312282c44e1..d06e99baf5d5ae239b67e3e7b23fd1063bae3db9 100644 (file)
@@ -541,6 +541,4 @@ long erofs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
 long erofs_compat_ioctl(struct file *filp, unsigned int cmd,
                        unsigned long arg);
 
-#define EFSCORRUPTED    EUCLEAN         /* Filesystem is corrupted */
-
 #endif /* __EROFS_INTERNAL_H */
index cf97b76e9fd3e9cf1d2553e7dc8813497b42e177..5e0c6c5fcb6cd6269484f7c4215d6d1f95186c2e 100644 (file)
@@ -357,7 +357,6 @@ struct ext2_inode {
  */
 #define        EXT2_VALID_FS                   0x0001  /* Unmounted cleanly */
 #define        EXT2_ERROR_FS                   0x0002  /* Errors detected */
-#define        EFSCORRUPTED                    EUCLEAN /* Filesystem is corrupted */
 
 /*
  * Mount flags
index 56112f201cace7dc3f0709f25fb8fb8980983e0f..62c091b52bacdf103f042c7d32381097e08d25a2 100644 (file)
@@ -3938,7 +3938,4 @@ extern int ext4_block_write_begin(handle_t *handle, struct folio *folio,
                                  get_block_t *get_block);
 #endif /* __KERNEL__ */
 
-#define EFSBADCRC      EBADMSG         /* Bad CRC detected */
-#define EFSCORRUPTED   EUCLEAN         /* Filesystem is corrupted */
-
 #endif /* _EXT4_H */
index 20edbb99b814a7787be5514be794ff24fc65ac5e..9f3aa3c7f12613431720c7cd659fe238a9fdc99a 100644 (file)
@@ -5004,7 +5004,4 @@ static inline void f2fs_invalidate_internal_cache(struct f2fs_sb_info *sbi,
        f2fs_invalidate_compress_pages_range(sbi, blkaddr, len);
 }
 
-#define EFSBADCRC      EBADMSG         /* Bad CRC detected */
-#define EFSCORRUPTED   EUCLEAN         /* Filesystem is corrupted */
-
 #endif /* _LINUX_F2FS_H */
index 2bfaf377f2086c04c6916f6fd6e855a1348b6758..7e1f652f16d311bc4b58de3dc2c76a00442c509d 100644 (file)
@@ -175,6 +175,4 @@ static inline int minix_test_bit(int nr, const void *vaddr)
        __minix_error_inode((inode), __func__, __LINE__,        \
                            (fmt), ##__VA_ARGS__)
 
-#define EFSCORRUPTED   EUCLEAN         /* Filesystem is corrupted */
-
 #endif /* FS_MINIX_H */
index 08ec8756b9487b3e3420263a256a5b9894436310..8399accc788dea45600a305298542ae2f24dd464 100644 (file)
@@ -55,8 +55,6 @@
 #define MF_DUPLICATE_MD                0x01
 #define MF_MIRROR_FE_LOADED    0x02
 
-#define EFSCORRUPTED EUCLEAN
-
 struct udf_meta_data {
        __u32   s_meta_file_loc;
        __u32   s_mirror_file_loc;
index 4dd747bdbccab27fd76fd4eff6d6113b2ed36ae1..55064228c4d5746b677515e5709ecdcbd8745b58 100644 (file)
@@ -121,8 +121,6 @@ typedef __u32                       xfs_nlink_t;
 
 #define ENOATTR                ENODATA         /* Attribute not found */
 #define EWRONGFS       EINVAL          /* Mount with wrong filesystem type */
-#define EFSCORRUPTED   EUCLEAN         /* Filesystem is corrupted */
-#define EFSBADCRC      EBADMSG         /* Bad CRC detected */
 
 #define __return_address __builtin_return_address(0)
 
index f5eaf76198f377c3c29b72c09e24445377a14764..a53a00d36228ce281e31f94fddb50246da62bb32 100644 (file)
@@ -1815,7 +1815,4 @@ static inline int jbd2_handle_buffer_credits(handle_t *handle)
 
 #endif /* __KERNEL__ */
 
-#define EFSBADCRC      EBADMSG         /* Bad CRC detected */
-#define EFSCORRUPTED   EUCLEAN         /* Filesystem is corrupted */
-
 #endif /* _LINUX_JBD2_H */
index cf9c51ac49f97efd8d5aed07cf4fca2d9a368515..92e7ae493ee315def84cc0841d8d9748b78d0939 100644 (file)
@@ -55,6 +55,7 @@
 #define        EMULTIHOP       72      /* Multihop attempted */
 #define        EDOTDOT         73      /* RFS specific error */
 #define        EBADMSG         74      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EOVERFLOW       75      /* Value too large for defined data type */
 #define        ENOTUNIQ        76      /* Name not unique on network */
 #define        EBADFD          77      /* File descriptor in bad state */
@@ -98,6 +99,7 @@
 #define        EINPROGRESS     115     /* Operation now in progress */
 #define        ESTALE          116     /* Stale file handle */
 #define        EUCLEAN         117     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         118     /* Not a XENIX named type file */
 #define        ENAVAIL         119     /* No XENIX semaphores available */
 #define        EISNAM          120     /* Is a named type file */
index 3d265f6babaf0a10f2c2baa67c46bb4ca52e1bef..6791f6508632ee67ad0c3ba363767e04e0f0bfb4 100644 (file)
@@ -55,6 +55,7 @@
 #define        ENOSR           82      /* Out of streams resources */
 #define        ETIME           83      /* Timer expired */
 #define        EBADMSG         84      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EPROTO          85      /* Protocol error */
 #define        ENODATA         86      /* No data available */
 #define        ENOSTR          87      /* Device not a stream */
@@ -96,6 +97,7 @@
 #define        EREMCHG         115     /* Remote address changed */
 
 #define        EUCLEAN         117     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         118     /* Not a XENIX named type file */
 #define        ENAVAIL         119     /* No XENIX semaphores available */
 #define        EISNAM          120     /* Is a named type file */
index 2fb714e2d6d8fcd41806d84e41b3e6f0edc04b7f..c01ed91b1ef44b8962297c6449ce0718bc1475eb 100644 (file)
@@ -50,6 +50,7 @@
 #define EDOTDOT                73      /* RFS specific error */
 #define EMULTIHOP      74      /* Multihop attempted */
 #define EBADMSG                77      /* Not a data message */
+#define EFSBADCRC      EBADMSG /* Bad CRC detected */
 #define ENAMETOOLONG   78      /* File name too long */
 #define EOVERFLOW      79      /* Value too large for defined data type */
 #define ENOTUNIQ       80      /* Name not unique on network */
@@ -88,6 +89,7 @@
 #define EISCONN                133     /* Transport endpoint is already connected */
 #define ENOTCONN       134     /* Transport endpoint is not connected */
 #define EUCLEAN                135     /* Structure needs cleaning */
+#define EFSCORRUPTED   EUCLEAN /* Filesystem is corrupted */
 #define ENOTNAM                137     /* Not a XENIX named type file */
 #define ENAVAIL                138     /* No XENIX semaphores available */
 #define EISNAM         139     /* Is a named type file */
index 8d94739d75c67c80fbea76fe3b5c08f1f8b1ea83..8cbc07c1903e4c332a0a3a48c5ec14e4ae59f450 100644 (file)
@@ -36,6 +36,7 @@
 
 #define        EDOTDOT         66      /* RFS specific error */
 #define        EBADMSG         67      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EUSERS          68      /* Too many users */
 #define        EDQUOT          69      /* Quota exceeded */
 #define        ESTALE          70      /* Stale file handle */
@@ -62,6 +63,7 @@
 #define        ERESTART        175     /* Interrupted system call should be restarted */
 #define        ESTRPIPE        176     /* Streams pipe error */
 #define        EUCLEAN         177     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         178     /* Not a XENIX named type file */
 #define        ENAVAIL         179     /* No XENIX semaphores available */
 #define        EISNAM          180     /* Is a named type file */
index 81a732b902ee3838ba91c2bf136e65022f3a0036..4a41e7835fd5b8c21c058ae10739e4d5510a36c5 100644 (file)
@@ -48,6 +48,7 @@
 #define        ENOSR           74      /* Out of streams resources */
 #define        ENOMSG          75      /* No message of desired type */
 #define        EBADMSG         76      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EIDRM           77      /* Identifier removed */
 #define        EDEADLK         78      /* Resource deadlock would occur */
 #define        ENOLCK          79      /* No record locks available */
@@ -91,6 +92,7 @@
 #define        ENOTUNIQ        115     /* Name not unique on network */
 #define        ERESTART        116     /* Interrupted syscall should be restarted */
 #define        EUCLEAN         117     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         118     /* Not a XENIX named type file */
 #define        ENAVAIL         119     /* No XENIX semaphores available */
 #define        EISNAM          120     /* Is a named type file */
index cf9c51ac49f97efd8d5aed07cf4fca2d9a368515..92e7ae493ee315def84cc0841d8d9748b78d0939 100644 (file)
@@ -55,6 +55,7 @@
 #define        EMULTIHOP       72      /* Multihop attempted */
 #define        EDOTDOT         73      /* RFS specific error */
 #define        EBADMSG         74      /* Not a data message */
+#define        EFSBADCRC       EBADMSG /* Bad CRC detected */
 #define        EOVERFLOW       75      /* Value too large for defined data type */
 #define        ENOTUNIQ        76      /* Name not unique on network */
 #define        EBADFD          77      /* File descriptor in bad state */
@@ -98,6 +99,7 @@
 #define        EINPROGRESS     115     /* Operation now in progress */
 #define        ESTALE          116     /* Stale file handle */
 #define        EUCLEAN         117     /* Structure needs cleaning */
+#define        EFSCORRUPTED    EUCLEAN /* Filesystem is corrupted */
 #define        ENOTNAM         118     /* Not a XENIX named type file */
 #define        ENAVAIL         119     /* No XENIX semaphores available */
 #define        EISNAM          120     /* Is a named type file */