Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756188Ab2KNBgm (ORCPT ); Tue, 13 Nov 2012 20:36:42 -0500 Received: from mail-ye0-f174.google.com ([209.85.213.174]:64021 "EHLO mail-ye0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756052Ab2KNBgk (ORCPT ); Tue, 13 Nov 2012 20:36:40 -0500 Date: Tue, 13 Nov 2012 17:36:33 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: Dave Jones , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] tmpfs: fix shmem_getpage_gfp VM_BUG_ON fix In-Reply-To: <20121107223830.GA12561@redhat.com> Message-ID: References: <20121101191052.GA5884@redhat.com> <20121101232030.GA25519@redhat.com> <20121102014336.GA1727@redhat.com> <20121106135402.GA3543@redhat.com> <20121107223830.GA12561@redhat.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1292 Lines: 35 We're still hoping to hear back from Dave Jones: but either way, please fold this patch into the earlier fix for 3.7 and -stable. Remove its VM_BUG_ON: because either it's as I believe, a tautology which cannot happen, and does not assert what I'd intended when I put it in, and would even be wrong if it did (a non-NULL entry can validly materialize there); or Dave actually hit it on his updated kernel, in which case more research will be needed, but for upstream we do not want a user to BUG there. Signed-off-by: Hugh Dickins --- mm/shmem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- mmotm/mm/shmem.c 2012-11-09 09:43:46.908046342 -0800 +++ linux/mm/shmem.c 2012-11-13 17:16:38.532528959 -0800 @@ -1158,10 +1158,8 @@ repeat: * Reset swap.val? No, leave it so "failed" goes back to * "repeat": reading a hole and writing should succeed. */ - if (error) { - VM_BUG_ON(error != -ENOENT); + if (error) delete_from_swap_cache(page); - } } if (error) goto failed; -- 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/