diff options
author | Sage Weil <sage@newdream.net> | 2010-09-17 11:38:25 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-10-20 18:38:15 -0400 |
commit | 93afd449aa3c0430ef409c13e1cb2b3f0458fc10 (patch) | |
tree | dd9ab308735c2414260539e33605197a5f90f069 /fs/ceph/caps.c | |
parent | 4c32f5dda5ffe23687a55da1538b7cc426710d1a (diff) |
ceph: only invalidate on check_caps if we actually have pages
The i_rdcache_gen value only implies we MAY have cached pages; actually
check the mapping to see if it's worth bothering with an invalidate.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 3cff67cbb9c0..3c03460f48bd 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -1534,7 +1534,7 @@ retry_locked: | |||
1534 | */ | 1534 | */ |
1535 | if ((!is_delayed || mdsc->stopping) && | 1535 | if ((!is_delayed || mdsc->stopping) && |
1536 | ci->i_wrbuffer_ref == 0 && /* no dirty pages... */ | 1536 | ci->i_wrbuffer_ref == 0 && /* no dirty pages... */ |
1537 | ci->i_rdcache_gen && /* may have cached pages */ | 1537 | inode->i_data.nrpages && /* have cached pages */ |
1538 | (file_wanted == 0 || /* no open files */ | 1538 | (file_wanted == 0 || /* no open files */ |
1539 | (revoking & (CEPH_CAP_FILE_CACHE| | 1539 | (revoking & (CEPH_CAP_FILE_CACHE| |
1540 | CEPH_CAP_FILE_LAZYIO))) && /* or revoking cache */ | 1540 | CEPH_CAP_FILE_LAZYIO))) && /* or revoking cache */ |