- Update to 3.3-rc2.
[linux-flexiantxendom0-3.2.10.git] / mm / truncate.c
index 632b15e..1f07994 100644 (file)
@@ -293,6 +293,13 @@ void truncate_inode_pages_range(struct address_space *mapping,
                index++;
        }
        cleancache_flush_inode(mapping);
+       /*
+        * Cycle the tree_lock to make sure all __delete_from_page_cache()
+        * calls run from page reclaim have finished as well (this handles the
+        * case when page reclaim took the last page from our range).
+        */
+       spin_lock_irq(&mapping->tree_lock);
+       spin_unlock_irq(&mapping->tree_lock);
 }
 EXPORT_SYMBOL(truncate_inode_pages_range);