Skip to content

Commit

Permalink
ceph fscache: Introduce a routine for uncaching single no data page f…
Browse files Browse the repository at this point in the history
…rom fscache

Signed-off-by: Li Wang <[email protected]>
Reviewed-by: Milosz Tanski <[email protected]>
  • Loading branch information
dragonylffly authored and idryomov committed Dec 31, 2013
1 parent 7221fe4 commit 3f42bc4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fs/ceph/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp)
return fscache_maybe_release_page(ci->fscache, page, gfp);
}

static inline void ceph_fscache_readpage_cancel(struct inode *inode,
struct page *page)
{
struct ceph_inode_info *ci = ceph_inode(inode);
if (fscache_cookie_valid(ci->fscache) && PageFsCache(page))
__fscache_uncache_page(ci->fscache, page);
}

static inline void ceph_fscache_readpages_cancel(struct inode *inode,
struct list_head *pages)
{
Expand Down Expand Up @@ -145,6 +153,11 @@ static inline int ceph_release_fscache_page(struct page *page, gfp_t gfp)
return 1;
}

static inline void ceph_fscache_readpage_cancel(struct inode *inode,
struct page *page)
{
}

static inline void ceph_fscache_readpages_cancel(struct inode *inode,
struct list_head *pages)
{
Expand Down

0 comments on commit 3f42bc4

Please sign in to comment.