f2fs: fix out-of-order execution in f2fs_issue_flush
authorChao Yu <yuchao0@huawei.com>
Mon, 21 Aug 2017 14:53:45 +0000 (22:53 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 29 Aug 2017 17:02:55 +0000 (10:02 -0700)
commit6f890df0a7efe3181aceb5d8bcd4af7deb2abce5
treece48d5d913e9f4c9712224f299a07e29dcffcef8
parent5f656541ff6e4f58b4ab5b4ae59badb97a9ff749
f2fs: fix out-of-order execution in f2fs_issue_flush

In f2fs_issue_flush, due to out-of-order execution of CPU, wake_up can
be called before we insert issue_list, result in long latency of
wait_for_completion. Fix this by adding smp_mb() to force the order of
related codes.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c