]> git.ipfire.org Git - people/arne_f/kernel.git/commit
f2fs: introduce cp_lock to protect updating of ckpt_flags
authorChao Yu <yuchao0@huawei.com>
Tue, 20 Sep 2016 03:04:18 +0000 (11:04 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 1 Oct 2016 00:34:20 +0000 (17:34 -0700)
commitaaec2b1d18792a5f27b69ff37f34f43f89f5aa3b
treed21e6ad4e210ad826580c03a55cb97230543c280
parentfadb2fb8af5348c1bc59cab17c6f8bf515e50d55
f2fs: introduce cp_lock to protect updating of ckpt_flags

This patch introduces spinlock to protect updating process of ckpt_flags
field in struct f2fs_checkpoint, it avoids incorrectly updating in race
condition.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: add __is_set_ckpt_flags likewise __set_ckpt_flags]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/node.h
fs/f2fs/recovery.c
fs/f2fs/segment.c
fs/f2fs/super.c