]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/truncate.c
UBUNTU: Ubuntu-4.15.0-96.97
[mirror_ubuntu-bionic-kernel.git] / mm / truncate.c
index e4b4cf0f407068caf2175624731f3d8f9b361098..a1a81067fffc50768b8c9652d12e130472e91e8e 100644 (file)
@@ -524,9 +524,13 @@ void truncate_inode_pages_final(struct address_space *mapping)
                 */
                spin_lock_irq(&mapping->tree_lock);
                spin_unlock_irq(&mapping->tree_lock);
-
-               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);