lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 10 Jul 2011 01:24:57 +0530
From:	Raghavendra D Prabhu <rprabhu@...hang.net>
To:	viro@...iv.linux.org.uk
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
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@...hang.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ