]> git.baikalelectronics.ru Git - 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)
commitfe0f9fc99334635aa46b754c161bd1b18155d061
treed21e6ad4e210ad826580c03a55cb97230543c280
parent0f4bf9cb1a9483f3a30c7ddfe256be93f4748dc8
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