ceph: invalidate pages that beyond EOF in ceph_writepages_start()
[linux-2.6-microblaze.git] / fs / ceph / inode.c
index c6ec5aa..be5f12d 100644 (file)
@@ -1867,20 +1867,9 @@ retry:
         * possibly truncate them.. so write AND block!
         */
        if (ci->i_wrbuffer_ref_head < ci->i_wrbuffer_ref) {
-               struct ceph_cap_snap *capsnap;
-               to = ci->i_truncate_size;
-               list_for_each_entry(capsnap, &ci->i_cap_snaps, ci_item) {
-                       // MDS should have revoked Frw caps
-                       WARN_ON_ONCE(capsnap->writing);
-                       if (capsnap->dirty_pages && capsnap->size > to)
-                               to = capsnap->size;
-               }
                spin_unlock(&ci->i_ceph_lock);
                dout("__do_pending_vmtruncate %p flushing snaps first\n",
                     inode);
-
-               truncate_pagecache(inode, to);
-
                filemap_write_and_wait_range(&inode->i_data, 0,
                                             inode->i_sb->s_maxbytes);
                goto retry;