* [PATCH] vfs: compile out IS_SWAPFILE() on swapless configs
@ 2024-04-10 18:08 Alexey Dobriyan
2024-04-11 12:01 ` Christian Brauner
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Dobriyan @ 2024-04-10 18:08 UTC (permalink / raw)
To: viro, brauner; +Cc: jack, linux-fsdevel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] vfs: compile out IS_SWAPFILE() on swapless configs
2024-04-10 18:08 [PATCH] vfs: compile out IS_SWAPFILE() on swapless configs Alexey Dobriyan
@ 2024-04-11 12:01 ` Christian Brauner
2024-04-11 17:51 ` [PATCH RESEND] vfs, swap: " Alexey Dobriyan
0 siblings, 1 reply; 3+ messages in thread
From: Christian Brauner @ 2024-04-11 12:01 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: viro, jack, linux-fsdevel
On 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH RESEND] vfs, swap: compile out IS_SWAPFILE() on swapless configs
2024-04-11 12:01 ` Christian Brauner
@ 2024-04-11 17:51 ` Alexey Dobriyan
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2024-04-11 17:51 UTC (permalink / raw)
To: Christian Brauner; +Cc: viro, jack, linux-fsdevel
No swap support -- no swapfiles possible.
Signed-off-by: Alexey Dobriyan (Yandex) <adobriyan@gmail.com>
---
include/linux/fs.h | 6 ++++++
1 file changed, 6 insertions(+)
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-11 17:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 18:08 [PATCH] vfs: compile out IS_SWAPFILE() on swapless configs Alexey Dobriyan
2024-04-11 12:01 ` Christian Brauner
2024-04-11 17:51 ` [PATCH RESEND] vfs, swap: " Alexey Dobriyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox