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>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 12 Nov 2013 09:25:40 +0800
From:	Li Wang <liwang@...ntukylin.com>
To:	linux-kernel@...r.kernel.org
Cc:	ceph-devel@...r.kernel.org, Sage Weil <sage@...tank.com>,
	linux-fsdevel@...r.kernel.org, Steve French <sfrench@...ba.org>,
	linux-cifs@...r.kernel.org, Milosz Tanski <milosz@...in.com>,
	David Howells <dhowells@...hat.com>, linux-cachefs@...hat.com,
	Li Wang <liwang@...ntukylin.com>
Subject: [PATCH 7/7] Cifs: Uncaching no-data page in readpage()

Currently, if one page allocated into fscache in readpage(), however, with
no-data read, it is not uncached. This patch fixes this.

Signed-off-by: Li Wang <liwang@...ntukylin.com>
---
 fs/cifs/file.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 7ddddf2..153bc58 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -3406,8 +3406,10 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
 
 	rc = cifs_read(file, read_data, PAGE_CACHE_SIZE, poffset);
 
-	if (rc < 0)
+	if (rc < 0) {
+		cifs_fscache_readpage_cancel(file_inode(file), page);
 		goto io_error;
+	}
 	else
 		cifs_dbg(FYI, "Bytes read %d\n", rc);
 
-- 
1.7.9.5

--
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