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/f2fs.h | |
parent | 8fe326cb996f89bac50cee2fdb4febfcca6eb297 (diff) | |
download | linux-d0d3f1b329b01a9e16609eeadcc6d4fae0afc7c8.tar.gz linux-d0d3f1b329b01a9e16609eeadcc6d4fae0afc7c8.tar.bz2 linux-d0d3f1b329b01a9e16609eeadcc6d4fae0afc7c8.zip |
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/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 9f3841be992f..6d0e7b185b39 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1047,6 +1047,7 @@ struct f2fs_sb_info { struct super_block *sb; /* pointer to VFS super block */ struct proc_dir_entry *s_proc; /* proc entry */ struct f2fs_super_block *raw_super; /* raw super block pointer */ + struct mutex sb_lock; /* lock for raw super block */ int valid_super_block; /* valid super block no */ unsigned long s_flag; /* flags for sbi */ |