summaryrefslogtreecommitdiff
path: root/fs/ceph/cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-01 12:46:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-01 12:46:30 -0700
commitb8a78bb4d103b3ea069c4831081cb1ba17062a4b (patch)
tree4760b424272b2b1bf231f85a9f8c3cbd73878be0 /fs/ceph/cache.c
parent3e1d79c8111a6077ce2505559f4efaea758c05d2 (diff)
parentdd2bc473482eedc60c29cf00ad12568ce40ce511 (diff)
Merge tag 'ceph-for-4.13-rc8' of git://github.com/ceph/ceph-client
Pull ceph fix from Ilya Dryomov: "ceph fscache page locking fix from Zheng, marked for stable" * tag 'ceph-for-4.13-rc8' of git://github.com/ceph/ceph-client: ceph: fix readpage from fscache
Diffstat (limited to 'fs/ceph/cache.c')
-rw-r--r--fs/ceph/cache.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/ceph/cache.c b/fs/ceph/cache.c
index fd1172823f86..337f88673ed9 100644
--- a/fs/ceph/cache.c
+++ b/fs/ceph/cache.c
@@ -297,13 +297,7 @@ void ceph_fscache_file_set_cookie(struct inode *inode, struct file *filp)
}
}
-static void ceph_vfs_readpage_complete(struct page *page, void *data, int error)
-{
- if (!error)
- SetPageUptodate(page);
-}
-
-static void ceph_vfs_readpage_complete_unlock(struct page *page, void *data, int error)
+static void ceph_readpage_from_fscache_complete(struct page *page, void *data, int error)
{
if (!error)
SetPageUptodate(page);
@@ -331,7 +325,7 @@ int ceph_readpage_from_fscache(struct inode *inode, struct page *page)
return -ENOBUFS;
ret = fscache_read_or_alloc_page(ci->fscache, page,
- ceph_vfs_readpage_complete, NULL,
+ ceph_readpage_from_fscache_complete, NULL,
GFP_KERNEL);
switch (ret) {
@@ -360,7 +354,7 @@ int ceph_readpages_from_fscache(struct inode *inode,
return -ENOBUFS;
ret = fscache_read_or_alloc_pages(ci->fscache, mapping, pages, nr_pages,
- ceph_vfs_readpage_complete_unlock,
+ ceph_readpage_from_fscache_complete,
NULL, mapping_gfp_mask(mapping));
switch (ret) {