X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=mm%2Ffilemap.c;h=b1ef7be1205bea652908a4d79fb12d6334f91378;hb=2c9dc472e66ff90530960c05cfbf29dfefae8dcd;hp=f0a15ce1bd1ba1cca4856e05e70d9e44128709b4;hpb=cbf3a2cb156a2c911d8f38d8247814b4c07f49a2;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/mm/filemap.c b/mm/filemap.c index f0a15ce..b1ef7be 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2667,6 +2667,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: */ @@ -3422,7 +3431,7 @@ static bool filemap_map_pmd(struct vm_fault *vmf, struct folio *folio, } } - if (pmd_none(*vmf->pmd)) + if (pmd_none(*vmf->pmd) && vmf->prealloc_pte) pmd_install(mm, vmf->pmd, &vmf->prealloc_pte); return false;