]> Gentwo Git Trees - linux/.git/commitdiff
fault-inject: make enum fault_flags available unconditionally
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Nov 2025 08:39:42 +0000 (09:39 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Thu, 13 Nov 2025 16:10:38 +0000 (17:10 +0100)
This will allow using should_fail_ex from code without having to
make it conditional on CONFIG_FAULT_INJECTION.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20251113084022.1255121-2-hch@lst.de
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/fault-inject.h

index 8c829d28dcf356976c6906a1837457d3d64513cd..58fd14c8227080e2873812bea484f1690574d264 100644 (file)
@@ -8,6 +8,10 @@
 struct dentry;
 struct kmem_cache;
 
+enum fault_flags {
+       FAULT_NOWARN =  1 << 0,
+};
+
 #ifdef CONFIG_FAULT_INJECTION
 
 #include <linux/atomic.h>
@@ -36,10 +40,6 @@ struct fault_attr {
        struct dentry *dname;
 };
 
-enum fault_flags {
-       FAULT_NOWARN =  1 << 0,
-};
-
 #define FAULT_ATTR_INITIALIZER {                                       \
                .interval = 1,                                          \
                .times = ATOMIC_INIT(1),                                \