On Tue, 13 Feb 2007 13:48:53 +1100 Nick Piggin wrote:

> Andrew Morton wrote:
> >>On Mon, 12 Feb 2007 14:50:40 -0800 Randy Dunlap <[EMAIL PROTECTED]> wrote:
> >>2.6.20-git8 on x86_64:
> >>
> >>
> >>  LD      init/built-in.o
> >>  LD      .tmp_vmlinux1
> >>mm/built-in.o: In function `sys_mincore':
> >>(.text+0xe584): undefined reference to `swapper_space'
> >>make: *** [.tmp_vmlinux1] Error 1
> > 
> > 
> > oops.  CONFIG_SWAP=n,  I assume?
> > 
> 
> Hmm, OK. Hugh can strip me of my bonus point now...
> 
> Hugh, you can strip me of my bonus point now... How about your other
> suggestion to just remove the stats from lookup_swap_cache? (and should
> we also rename it to find_get_swap_page?)

I need a fix for this.  It's killing my daily/automated builds.
So here is an ifdeffery-fix.

BUT:  what is <present> used for in that loop?  or is it used?

---
From: Randy Dunlap <[EMAIL PROTECTED]>

Don't check for pte swap entries when CONFIG_SWAP=n.

mm/built-in.o: In function `sys_mincore':
(.text+0xe584): undefined reference to `swapper_space'

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 mm/mincore.c |    4 ++++
 1 file changed, 4 insertions(+)

--- linux-2.6.20-git8.orig/mm/mincore.c
+++ linux-2.6.20-git8/mm/mincore.c
@@ -111,6 +111,7 @@ static long do_mincore(unsigned long add
                        present = mincore_page(vma->vm_file->f_mapping, pgoff);
 
                } else { /* pte is a swap entry */
+#ifdef CONFIG_SWAP
                        swp_entry_t entry = pte_to_swp_entry(pte);
                        if (is_migration_entry(entry)) {
                                /* migration entries are always uptodate */
@@ -119,6 +120,9 @@ static long do_mincore(unsigned long add
                                pgoff = entry.val;
                                present = mincore_page(&swapper_space, pgoff);
                        }
+#else
+                       present = 0;
+#endif
                }
        }
        pte_unmap_unlock(ptep-1, ptl);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to