[Devel] [RFC 39/54] swapfile: fix CONFIG_VE=n build
Eva Kurchatova
eva.kurchatova at virtuozzo.com
Wed Apr 29 22:58:39 MSK 2026
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
---
mm/swapfile.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 3a18b3b08535..7173667dcba8 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3013,6 +3013,7 @@ static const struct seq_operations swaps_op = {
.show = swap_show
};
+#ifdef CONFIG_VE
static int swap_show_ve(struct seq_file *swap, void *v)
{
struct ve_struct *ve = get_exec_env();
@@ -3032,15 +3033,16 @@ static int swap_show_ve(struct seq_file *swap, void *v)
out:
return 0;
}
+#endif
static int swaps_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int ret;
-
+#ifdef CONFIG_VE
if (!ve_is_super(get_exec_env()))
return single_open(file, &swap_show_ve, NULL);
-
+#endif
ret = seq_open(file, &swaps_op);
if (ret)
return ret;
--
2.54.0
More information about the Devel
mailing list