vfs: compile out IS_SWAPFILE() on swapless configs
PATCH 1/1 vfs: compile out IS_SWAPFILE() on swapless configs
Christian Brauner
maintainerOn Wed, Apr 10, 2024 at 09:08:01PM +0300, Alexey Dobriyan wrote:
Fyi, this mail is empty for me. Not sure if this was an accident on your end or something else.
PATCH RESEND 1/1 vfs, swap: compile out IS_SWAPFILE() on swapless configs
No swap support -- no swapfiles possible.
Signed-off-by Alexey Dobriyan (Yandex) <[email protected]>
---
include/linux/fs.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/linux/fs.h +6 -0
@@ -2253,7 +2253,13 @@ static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags#define IS_DEADDIR (inode) ((inode)->i_flags & S_DEAD)#define IS_NOCMTIME (inode) ((inode)->i_flags & S_NOCMTIME) + +#ifdef CONFIG_SWAP #define IS_SWAPFILE (inode) ((inode)->i_flags & S_SWAPFILE) +#else +#define IS_SWAPFILE (inode) ((void)(inode), 0U) +#endif +#define IS_PRIVATE (inode) ((inode)->i_flags & S_PRIVATE)#define IS_IMA (inode) ((inode)->i_flags & S_IMA)#define IS_AUTOMOUNT (inode) ((inode)->i_flags & S_AUTOMOUNT)