summaryrefslogtreecommitdiff
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-12-20 14:47:18 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-12-20 14:47:18 -0800
commita721aeac8bc2cade37e68ea195f28d2ed28c1130 (patch)
tree34da931ad1d0d715c4fde89d19af67780e40a6aa /mm/filemap.c
parentd9d9bd979cced7d4a51b65224b1d7f396c8b4eea (diff)
parent1803d0c5ee1a3bbee23db2336e21add067824f02 (diff)
sync mm-stable with mm-hotfixes-stable to pick up depended-upon changes
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c0d7e1d7eea2..67ba56ecdd32 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2608,6 +2608,15 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
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:
*/