From: Adam Litke <agl@us.ibm.com>
To: akpm@osdl.org
Cc: "ADAM G. LITKE [imap]" <agl@us.ibm.com>,
linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
hugh@veritas.com
Subject: [TRIVIAL PATCH] mm: Make filemap_nopage use NOPAGE_SIGBUS
Date: Thu, 28 Sep 2006 19:09:52 +0000 [thread overview]
Message-ID: <1159470592.12797.23334.camel@localhost.localdomain> (raw)
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 <agl@us.ibm.com>
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2006-09-28 19:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 19:09 Adam Litke [this message]
2006-09-28 19:14 ` Hugh Dickins
-- strict thread matches above, loose matches on Subject: below --
2006-09-18 15:32 Adam Litke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1159470592.12797.23334.camel@localhost.localdomain \
--to=agl@us.ibm.com \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox