diff options
-rw-r--r-- | fs/ceph/addr.c | 1 | ||||
-rw-r--r-- | fs/ceph/cache.h | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 1fda9cf04a81..6df8bd481425 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -336,6 +336,7 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max) | |||
336 | page->index); | 336 | page->index); |
337 | if (add_to_page_cache_lru(page, &inode->i_data, page->index, | 337 | if (add_to_page_cache_lru(page, &inode->i_data, page->index, |
338 | GFP_NOFS)) { | 338 | GFP_NOFS)) { |
339 | ceph_fscache_uncache_page(inode, page); | ||
339 | page_cache_release(page); | 340 | page_cache_release(page); |
340 | dout("start_read %p add_to_page_cache failed %p\n", | 341 | dout("start_read %p add_to_page_cache failed %p\n", |
341 | inode, page); | 342 | inode, page); |
diff --git a/fs/ceph/cache.h b/fs/ceph/cache.h index fb326fd33251..bf4869547291 100644 --- a/fs/ceph/cache.h +++ b/fs/ceph/cache.h | |||
@@ -51,6 +51,13 @@ static inline void ceph_fscache_invalidate(struct inode *inode) | |||
51 | fscache_invalidate(ceph_inode(inode)->fscache); | 51 | fscache_invalidate(ceph_inode(inode)->fscache); |
52 | } | 52 | } |
53 | 53 | ||
54 | static inline void ceph_fscache_uncache_page(struct inode *inode, | ||
55 | struct page *page) | ||
56 | { | ||
57 | struct ceph_inode_info *ci = ceph_inode(inode); | ||
58 | return fscache_uncache_page(ci->fscache, page); | ||
59 | } | ||
60 | |||
54 | static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) | 61 | static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) |
55 | { | 62 | { |
56 | struct inode* inode = page->mapping->host; | 63 | struct inode* inode = page->mapping->host; |
@@ -94,7 +101,8 @@ static inline void ceph_fscache_register_inode_cookie(struct ceph_fs_client* par | |||
94 | { | 101 | { |
95 | } | 102 | } |
96 | 103 | ||
97 | static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) | 104 | static inline void ceph_fscache_uncache_page(struct inode *inode, |
105 | struct page *pages) | ||
98 | { | 106 | { |
99 | } | 107 | } |
100 | 108 | ||
@@ -126,6 +134,10 @@ static inline void ceph_invalidate_fscache_page(struct inode *inode, | |||
126 | { | 134 | { |
127 | } | 135 | } |
128 | 136 | ||
137 | static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) | ||
138 | { | ||
139 | } | ||
140 | |||
129 | static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) | 141 | static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) |
130 | { | 142 | { |
131 | return 1; | 143 | return 1; |