Commit 8d7319f8 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim
Browse files

UPSTREAM: f2fs: compress: fix to cover {reserve,release}_compress_blocks() w/ cp_rwsem lock



It needs to cover {reserve,release}_compress_blocks() w/ cp_rwsem lock
to avoid racing with checkpoint, otherwise, filesystem metadata including
blkaddr in dnode, inode fields and .total_valid_block_count may be
corrupted after SPO case.

Fixes: ef8d563f ("f2fs: introduce F2FS_IOC_RELEASE_COMPRESS_BLOCKS")
Fixes: c75488fb ("f2fs: introduce F2FS_IOC_RESERVE_COMPRESS_BLOCKS")
Change-Id: Ie97786b7d498a0d88e1f60bd17dcf706e28ae4f7
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 0a4ed2d9)
parent 6d885649
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment