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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Nov 2013 09:25:34 +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 1/7] Fscache: Introduce new API fscache_readpage_cancel()

Introduce a new API fscache_readpage_cancel() for uncaching one single
no-data page from fscache.

Signed-off-by: Li Wang <liwang@...ntukylin.com>
---
 include/linux/fscache.h |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/linux/fscache.h b/include/linux/fscache.h
index 115bb81..f1ed21f 100644
--- a/include/linux/fscache.h
+++ b/include/linux/fscache.h
@@ -245,6 +245,8 @@ extern bool __fscache_maybe_release_page(struct fscache_cookie *, struct page *,
 					 gfp_t);
 extern void __fscache_uncache_all_inode_pages(struct fscache_cookie *,
 					      struct inode *);
+extern void __fscache_readpage_cancel(struct fscache_cookie *cookie,
+				      struct page *page);
 extern void __fscache_readpages_cancel(struct fscache_cookie *cookie,
 				       struct list_head *pages);
 extern void __fscache_disable_cookie(struct fscache_cookie *, bool);
@@ -633,6 +635,15 @@ int fscache_alloc_page(struct fscache_cookie *cookie,
 		return -ENOBUFS;
 }
 
+static inline
+void fscache_readpage_cancel(struct fscache_cookie *cookie,
+			     struct page *page)
+{
+	if (fscache_cookie_valid(cookie))
+		__fscache_readpage_cancel(cookie, page);
+}
+
+
 /**
  * fscache_readpages_cancel - Cancel read/alloc on pages
  * @cookie: The cookie representing the inode's cache object.
-- 
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