Skip to content
Snippets Groups Projects
Commit 55892e29 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Frieder Schrempf
Browse files

ubifs: Set page uptodate in the correct place


[ Upstream commit 723012ca ]

Page cache reads are lockless, so setting the freshly allocated page
uptodate before we've overwritten it with the data it's supposed to have
in it will allow a simultaneous reader to see old data.  Move the call
to SetPageUptodate into ubifs_write_end(), which is after we copied the
new data into the page.

Fixes: 1e51764a ("UBIFS: add new flash file system")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e8357d51
No related branches found
No related tags found
1 merge request!136🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.85)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment