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) page->index); if (add_to_page_cache_lru(page, &inode->i_data, page->index, GFP_NOFS)) { + ceph_fscache_uncache_page(inode, page); page_cache_release(page); dout("start_read %p add_to_page_cache failed %p\n", 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) fscache_invalidate(ceph_inode(inode)->fscache); } +static inline void ceph_fscache_uncache_page(struct inode *inode, + struct page *page) +{ + struct ceph_inode_info *ci = ceph_inode(inode); + return fscache_uncache_page(ci->fscache, page); +} + static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) { struct inode* inode = page->mapping->host; @@ -94,7 +101,8 @@ static inline void ceph_fscache_register_inode_cookie(struct ceph_fs_client* par { } -static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) +static inline void ceph_fscache_uncache_page(struct inode *inode, + struct page *pages) { } @@ -126,6 +134,10 @@ static inline void ceph_invalidate_fscache_page(struct inode *inode, { } +static inline void ceph_fscache_unregister_inode_cookie(struct ceph_inode_info* ci) +{ +} + static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp) { return 1;