[PATCH] Add unlikely to page condition
From: Raghavendra D Prabhu
Date: Sat Jul 09 2011 - 15:55:23 EST
Hi,
Added an unlikely to the page check since page will more likely be
in the page cache because of page_cache_sync_readahead before it.
Signed-off-by: Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
---
fs/splice.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/splice.c b/fs/splice.c
index aa866d3..f0e591a 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -349,7 +349,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
* the first hole.
*/
page = find_get_page(mapping, index);
- if (!page) {
+ if (unlikely(!page)) {
/*
* page didn't exist, allocate one.
*/
--
1.7.6
--------------------------
Raghavendra Prabhu
GPG Id : 0xD72BE977
Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977
www: wnohang.net
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/