diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-02-11 22:53:20 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-03-13 08:05:46 +0900 |
commit | d0d3f1b329b01a9e16609eeadcc6d4fae0afc7c8 (patch) | |
tree | 735e01f4251edb9a2eff79a53e0874d3e156c99c /fs/f2fs/super.c | |
parent | 8fe326cb996f89bac50cee2fdb4febfcca6eb297 (diff) | |
download | linux-d0d3f1b329b01a9e16609eeadcc6d4fae0afc7c8.tar.bz2 |
f2fs: introduce sb_lock to make encrypt pwsalt update exclusive
f2fs_super_block.encrypt_pw_salt can be udpated and persisted
concurrently, result in getting different pwsalt in separated
threads, so let's introduce sb_lock to exclude concurrent
accessers.
Signed-off-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index ff6da6e05ec9..d2833a232528 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2221,6 +2221,8 @@ static void init_sb_info(struct f2fs_sb_info *sbi) sbi->dirty_device = 0; spin_lock_init(&sbi->dev_lock); + + mutex_init(&sbi->sb_lock); } static int init_percpu_info(struct f2fs_sb_info *sbi) |