Whamcloud - gitweb
LU-5584 llite: ensure all data flush out when umount
[fs/lustre-release.git] / lustre / include / linux / lustre_compat25.h
index e2e46f9..ed26bb6 100644 (file)
@@ -368,7 +368,15 @@ static inline int radix_tree_exceptional_entry(void *arg)
 #endif
 
 #ifndef HAVE_TRUNCATE_INODE_PAGES_FINAL
-# define truncate_inode_pages_final(map) truncate_inode_pages(map, 0)
+static inline void truncate_inode_pages_final(struct address_space *map)
+{
+       truncate_inode_pages(map, 0);
+               /* Workaround for LU-118 */
+       if (map->nrpages) {
+               spin_lock_irq(&map->tree_lock);
+               spin_unlock_irq(&map->tree_lock);
+       }       /* Workaround end */
+}
 #endif
 
 #ifndef SIZE_MAX