Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211604
b: refs/heads/master
c: 18a3819
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Oct 20, 2010
1 parent 448678a commit 8af94b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93afd449aa3c0430ef409c13e1cb2b3f0458fc10
refs/heads/master: 18a38193efcaac1fb3c94ad8fa04bb117850a3c2
13 changes: 1 addition & 12 deletions trunk/fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,17 +1417,6 @@ static int __mark_caps_flushing(struct inode *inode,
/*
* try to invalidate mapping pages without blocking.
*/
static int mapping_is_empty(struct address_space *mapping)
{
struct page *page = find_get_page(mapping, 0);

if (!page)
return 1;

put_page(page);
return 0;
}

static int try_nonblocking_invalidate(struct inode *inode)
{
struct ceph_inode_info *ci = ceph_inode(inode);
Expand All @@ -1437,7 +1426,7 @@ static int try_nonblocking_invalidate(struct inode *inode)
invalidate_mapping_pages(&inode->i_data, 0, -1);
spin_lock(&inode->i_lock);

if (mapping_is_empty(&inode->i_data) &&
if (inode->i_data.nrpages == 0 &&
invalidating_gen == ci->i_rdcache_gen) {
/* success. */
dout("try_nonblocking_invalidate %p success\n", inode);
Expand Down

0 comments on commit 8af94b6

Please sign in to comment.