Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fault-inject: make enum fault_flags available unconditionally

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>

authored by

Christoph Hellwig and committed by
Vlastimil Babka
0f2620ff dcb6fa37

+4 -4
+4 -4
include/linux/fault-inject.h
··· 8 8 struct dentry; 9 9 struct kmem_cache; 10 10 11 + enum fault_flags { 12 + FAULT_NOWARN = 1 << 0, 13 + }; 14 + 11 15 #ifdef CONFIG_FAULT_INJECTION 12 16 13 17 #include <linux/atomic.h> ··· 38 34 unsigned long count; 39 35 struct ratelimit_state ratelimit_state; 40 36 struct dentry *dname; 41 - }; 42 - 43 - enum fault_flags { 44 - FAULT_NOWARN = 1 << 0, 45 37 }; 46 38 47 39 #define FAULT_ATTR_INITIALIZER { \