Merge tag 'xarray-4.20-rc7' of git://git.infradead.org/users/willy/linux-dax
[sfrench/cifs-2.6.git] / mm / truncate.c
index 45d68e90b7037669fce5b50849c4d5964451c2d4..798e7ccfb030be40fded9eb6fed45960e2956938 100644 (file)
@@ -517,9 +517,13 @@ void truncate_inode_pages_final(struct address_space *mapping)
                 */
                xa_lock_irq(&mapping->i_pages);
                xa_unlock_irq(&mapping->i_pages);
-
-               truncate_inode_pages(mapping, 0);
        }
+
+       /*
+        * Cleancache needs notification even if there are no pages or shadow
+        * entries.
+        */
+       truncate_inode_pages(mapping, 0);
 }
 EXPORT_SYMBOL(truncate_inode_pages_final);