Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2e72fa0 authored by Daeho Jeong's avatar Daeho Jeong Committed by Greg Kroah-Hartman
Browse files

BACKPORT: f2fs: change i_compr_blocks of inode to atomic value



commit c2759ebaf7e8 upstream.

writepages() can be concurrently invoked for the same file by different
threads such as a thread fsyncing the file and a kworker kernel thread.
So, changing i_compr_blocks without protection is racy and we need to
protect it by changing it with atomic type value. Plus, we don't need
a 64bit value for i_compr_blocks, so just we will use a atomic value,
not atomic64.

Bug: 237904436
Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I11f837249078d1b7ef50ac9c156c375542c714b3
parent 86290591
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment