Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755552Ab2ENIzu (ORCPT ); Mon, 14 May 2012 04:55:50 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:45972 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754863Ab2ENIzt (ORCPT ); Mon, 14 May 2012 04:55:49 -0400 Message-ID: <4FB0C888.8070805@gmail.com> Date: Mon, 14 May 2012 16:55:36 +0800 From: Cong Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Hugh Dickins CC: Andrew Morton , Christoph Hellwig , KAMEZAWA Hiroyuki , Alan Cox , Stephane Marchesin , Andi Kleen , Dave Airlie , Daniel Vetter , Rob Clark , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/10] shmem: replace page if mapping excludes its zone References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 687 Lines: 19 On 05/12/2012 07:59 PM, Hugh Dickins wrote: > + VM_BUG_ON(!PageLocked(oldpage)); > + __set_page_locked(newpage); > + VM_BUG_ON(!PageUptodate(oldpage)); > + SetPageUptodate(newpage); > + VM_BUG_ON(!PageSwapBacked(oldpage)); > + SetPageSwapBacked(newpage); > + VM_BUG_ON(!swap_index); > + set_page_private(newpage, swap_index); > + VM_BUG_ON(!PageSwapCache(oldpage)); > + SetPageSwapCache(newpage); > + Are all of these VM_BUG_ON's necessary? -- 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/