Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0840d8af authored by Sage Weil's avatar Sage Weil
Browse files

ceph: invalidate pages even if truncate is pending



There is no reason not to invalidate pages when a truncate is pending.
Both throw out page cache pages.

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 3c6f6b79
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1444,7 +1444,6 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags,
	    ci->i_rdcache_gen &&                     /* may have cached pages */
	    (file_wanted == 0 ||                     /* no open files */
	     (revoking & CEPH_CAP_FILE_CACHE)) &&     /*  or revoking cache */
	    !ci->i_truncate_pending &&
	    !tried_invalidate) {
		u32 invalidating_gen = ci->i_rdcache_gen;
		int ret;