Commit 0c3d1c94 authored by Chao Yu's avatar Chao Yu Committed by Todd Kjos
Browse files

FROMGIT: f2fs: compress: fix to cover normal cluster write with cp_rwsem



When we overwrite compressed cluster w/ normal cluster, we should
not unlock cp_rwsem during f2fs_write_raw_pages(), otherwise data
will be corrupted if partial blocks were persisted before CP & SPOR,
due to cluster metadata wasn't updated atomically.

Fixes: 4c8ff709 ("f2fs: support data compression")
Reviewed-by: default avatarDaeho Jeong <daehojeong@google.com>
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>

Bug: 313549450
(cherry picked from commit fd244524
 https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git

 dev)
Change-Id: I231eef3eb7ee5a105ad929718a6d1d67f4950dd2
Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
parent 02a1ce0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment