[PATCH] shm: CONFIG_SHMEM=n build fix
authorAndrew Morton <akpm@osdl.org>
Tue, 2 Aug 2005 04:11:45 +0000 (21:11 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 2 Aug 2005 04:38:00 +0000 (21:38 -0700)
Fix bug found by Grant Coady <lkml@dodo.com.au>'s autobuild setup.

shmem_set_policy() and shmem_get_policy() are macros if !CONFIG_SHMEM, so this
doesn't work.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
ipc/shm.c

index cce022435dbc95ff562b28cd073b2d239206af52..1d6cf08d950b93c9f5223c7ead161b6f08ed9877 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -170,7 +170,7 @@ static struct vm_operations_struct shm_vm_ops = {
        .open   = shm_open,     /* callback for a new vm-area open */
        .close  = shm_close,    /* callback for when the vm-area is released */
        .nopage = shmem_nopage,
-#ifdef CONFIG_NUMA
+#if defined(CONFIG_NUMA) && defined(CONFIG_SHMEM)
        .set_policy = shmem_set_policy,
        .get_policy = shmem_get_policy,
 #endif