Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964829AbVJZQtG (ORCPT ); Wed, 26 Oct 2005 12:49:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964828AbVJZQtG (ORCPT ); Wed, 26 Oct 2005 12:49:06 -0400 Received: from omx2-ext.sgi.com ([192.48.171.19]:34259 "EHLO omx2.sgi.com") by vger.kernel.org with ESMTP id S964826AbVJZQtE (ORCPT ); Wed, 26 Oct 2005 12:49:04 -0400 Date: Wed, 26 Oct 2005 09:48:32 -0700 (PDT) From: Christoph Lameter To: Dave Hansen cc: Andrew Morton , Marcelo Tosatti , Mike Kravetz , Ray Bryant , Lee Schermerhorn , Linux Kernel Mailing List , linux-mm , Magnus Damm , Paul Jackson , KAMEZAWA Hiroyuki Subject: Re: [PATCH 3/5] Swap Migration V4: migrate_pages() function In-Reply-To: <1130310934.1226.29.camel@localhost> Message-ID: References: <20051025193023.6828.89649.sendpatchset@schroedinger.engr.sgi.com> <20051025193039.6828.74991.sendpatchset@schroedinger.engr.sgi.com> <1130310934.1226.29.camel@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 33 On Wed, 26 Oct 2005, Dave Hansen wrote: > Why is this #ifdef needed? PageSwapCache() is #defined to 0 when ! > CONFIG_SWAP. Right. Index: linux-2.6.14-rc5-mm1/mm/vmscan.c =================================================================== --- linux-2.6.14-rc5-mm1.orig/mm/vmscan.c 2005-10-26 09:46:20.000000000 -0700 +++ linux-2.6.14-rc5-mm1/mm/vmscan.c 2005-10-26 09:47:33.000000000 -0700 @@ -387,7 +387,6 @@ static inline int remove_mapping(struct if (unlikely(PageDirty(page))) goto cannot_free; -#ifdef CONFIG_SWAP if (PageSwapCache(page)) { swp_entry_t swap = { .val = page_private(page) }; add_to_swapped_list(swap.val); @@ -397,7 +396,6 @@ static inline int remove_mapping(struct __put_page(page); /* The pagecache ref */ return 1; } -#endif /* CONFIG_SWAP */ __remove_from_page_cache(page); write_unlock_irq(&mapping->tree_lock); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/