Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030321AbWI1TPU (ORCPT ); Thu, 28 Sep 2006 15:15:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030374AbWI1TPU (ORCPT ); Thu, 28 Sep 2006 15:15:20 -0400 Received: from excu-mxob-1.symantec.com ([198.6.49.12]:33528 "EHLO excu-mxob-1.symantec.com") by vger.kernel.org with ESMTP id S1030321AbWI1TPS (ORCPT ); Thu, 28 Sep 2006 15:15:18 -0400 Date: Thu, 28 Sep 2006 20:14:55 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.wat.veritas.com To: Adam Litke cc: akpm@osdl.org, linux-mm , linux-kernel Subject: Re: [TRIVIAL PATCH] mm: Make filemap_nopage use NOPAGE_SIGBUS In-Reply-To: <1159470592.12797.23334.camel@localhost.localdomain> Message-ID: References: <1159470592.12797.23334.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 28 Sep 2006 19:14:48.0016 (UTC) FILETIME=[5D51F500:01C6E332] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1738 Lines: 56 On Thu, 28 Sep 2006, Adam Litke wrote: > Hi Andrew. This is just a "nice to have" cleanup patch. Any chance on > getting it merged (lest I forget about it again)? Thanks. > > While reading trough filemap_nopage() I found the 'return NULL' > statements a bit confusing since we already have two constants defined > for ->nopage error conditions. Since a NULL return value really means > NOPAGE_SIGBUS, just return that to make the code more readable. > > Signed-off-by: Adam Litke That's long confused and irritated me, gladly Acked-by: Hugh Dickins > > filemap.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > diff -upN reference/mm/filemap.c current/mm/filemap.c > --- reference/mm/filemap.c > +++ current/mm/filemap.c > @@ -1454,7 +1454,7 @@ outside_data_content: > * accessible.. > */ > if (area->vm_mm == current->mm) > - return NULL; > + return NOPAGE_SIGBUS; > /* Fall through to the non-read-ahead case */ > no_cached_page: > /* > @@ -1479,7 +1479,7 @@ no_cached_page: > */ > if (error == -ENOMEM) > return NOPAGE_OOM; > - return NULL; > + return NOPAGE_SIGBUS; > > page_not_uptodate: > if (!did_readaround) { > @@ -1548,7 +1548,7 @@ page_not_uptodate: > */ > shrink_readahead_size_eio(file, ra); > page_cache_release(page); > - return NULL; > + return NOPAGE_SIGBUS; > } > EXPORT_SYMBOL(filemap_nopage); > > -- > Adam Litke - (agl at us.ibm.com) > IBM Linux Technology Center > - 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/