[PATCH -mm] splice: Disable vmsplice on nommu.
From: Paul Mundt
Date: Tue Sep 11 2007 - 04:23:33 EST
The vmsplice rework in -mm breaks nommu:
fs/built-in.o: In function `splice_setup_vma':
fs/splice.c:1272: undefined reference to `may_expand_vm'
fs/splice.c:1272: undefined reference to `protection_map'
fs/splice.c:1272: undefined reference to `insert_vm_struct'
fs/splice.c:1272: undefined reference to `vm_stat_account'
This is going to be non-trivial to wire up properly on nommu, and
it's debateable whether there's even any point in trying. For now,
disable vmsplice if CONFIG_MMU=n and wire it up as a cond syscall
for the platforms that support both.
Signed-off-by: Paul Mundt <lethal@xxxxxxxxxxxx>
--
fs/splice.c | 2 ++
kernel/sys_ni.c | 1 +
2 files changed, 3 insertions(+)
--- linux-2.6.23-rc4-mm1.orig/fs/splice.c 2007-09-11 15:15:54.000000000 +0900
+++ linux-2.6.23-rc4-mm1/fs/splice.c 2007-09-11 17:11:02.000000000 +0900
@@ -1180,6 +1180,7 @@
return -EINVAL;
}
+#ifdef CONFIG_MMU
/*
* Undo vmsplice_to_user map. Basically just lookup the vmas and
* detach/unmap/remove them.
@@ -1686,6 +1687,7 @@
return error;
}
+#endif /* CONFIG_MMU */
asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
int fd_out, loff_t __user *off_out,
--- linux-2.6.23-rc4-mm1.orig/kernel/sys_ni.c 2007-09-11 15:15:56.000000000 +0900
+++ linux-2.6.23-rc4-mm1/kernel/sys_ni.c 2007-09-11 17:09:24.000000000 +0900
@@ -139,6 +139,7 @@
cond_syscall(sys_madvise);
cond_syscall(sys_mremap);
cond_syscall(sys_remap_file_pages);
+cond_syscall(sys_vmsplice);
cond_syscall(compat_sys_move_pages);
cond_syscall(compat_sys_migrate_pages);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/