lkml.org 
[lkml]   [2011]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Add unlikely to page condition
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@wnohang.net>
---
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

\
 
 \ /
  Last update: 2011-07-09 21:57    [W:0.030 / U:4.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site