Merge tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / mm / filemap.c
index 31ab455..7437b2b 100644 (file)
  *    ->private_lock           (zap_pte_range->block_dirty_folio)
  */
 
+static void mapping_set_update(struct xa_state *xas,
+               struct address_space *mapping)
+{
+       if (dax_mapping(mapping) || shmem_mapping(mapping))
+               return;
+       xas_set_update(xas, workingset_update_node);
+       xas_set_lru(xas, &shadow_nodes);
+}
+
 static void page_cache_delete(struct address_space *mapping,
                                   struct folio *folio, void *shadow)
 {
@@ -2606,15 +2615,6 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
                        goto put_folios;
                end_offset = min_t(loff_t, isize, iocb->ki_pos + iter->count);
 
-               /*
-                * Pairs with a barrier in
-                * block_write_end()->mark_buffer_dirty() or other page
-                * dirtying routines like iomap_write_end() to ensure
-                * changes to page contents are visible before we see
-                * increased inode size.
-                */
-               smp_rmb();
-
                /*
                 * Once we start copying data, we don't want to be touching any
                 * cachelines that might be contended: