aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorGravatar Sahitya Tummala <stummala@codeaurora.org> 2020-11-23 10:58:32 +0530
committerGravatar Jaegeuk Kim <jaegeuk@kernel.org> 2020-12-02 22:00:21 -0800
commit8769918bf06c9cfb01a1a6ee0e547c9916881496 (patch)
tree5ac4d1494b84a00c6736f28b0fad369d10432ff8 /fs/f2fs/super.c
parentf2fs: Handle casefolding with Encryption (diff)
downloadlinux-8769918bf06c9cfb01a1a6ee0e547c9916881496.tar.gz
linux-8769918bf06c9cfb01a1a6ee0e547c9916881496.tar.bz2
linux-8769918bf06c9cfb01a1a6ee0e547c9916881496.zip
f2fs: change to use rwsem for cp_mutex
Use rwsem to ensure serialization of the callers and to avoid starvation of high priority tasks, when the system is under heavy IO workload. Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 1c282c3da263..82baaa89c893 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3551,7 +3551,7 @@ try_onemore:
sbi->valid_super_block = valid_super_block;
init_rwsem(&sbi->gc_lock);
mutex_init(&sbi->writepages);
- mutex_init(&sbi->cp_mutex);
+ init_rwsem(&sbi->cp_global_sem);
init_rwsem(&sbi->node_write);
init_rwsem(&sbi->node_change);