projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42bd2af
)
vfs, swap: compile out IS_SWAPFILE() on swapless configs
author
Alexey Dobriyan
<adobriyan@gmail.com>
Thu, 11 Apr 2024 17:51:07 +0000
(20:51 +0300)
committer
Christian Brauner
<brauner@kernel.org>
Mon, 15 Apr 2024 14:56:14 +0000
(16:56 +0200)
No swap support -- no swapfiles possible.
Signed-off-by: Alexey Dobriyan (Yandex) <adobriyan@gmail.com>
Link:
https://lore.kernel.org/r/2391c7f5-0f83-4188-ae56-4ec7ccbf2576@p183
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/fs.h
patch
|
blob
|
history
diff --git
a/include/linux/fs.h
b/include/linux/fs.h
index b053f98393e66a433a39c100669ae1352299729e..d376dd7057d53c255d2b45eabc1b876a2d8f5188 100644
(file)
--- a/
include/linux/fs.h
+++ b/
include/linux/fs.h
@@
-2260,7
+2260,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)