aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2021-02-20 17:38:43 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2021-03-12 13:16:42 -0800
commit3b42c741b1bf52ee9ed6fba5f9636d80ddacf73f (patch)
treea2462b90f5489da7f42f0d113a0dbbadf95fb288 /fs/f2fs/segment.c
parentf2fs: remove unused FORCE_FG_GC macro (diff)
downloadlinux-dev-3b42c741b1bf52ee9ed6fba5f9636d80ddacf73f.tar.xz
linux-dev-3b42c741b1bf52ee9ed6fba5f9636d80ddacf73f.zip
f2fs: update comments for explicit memory barrier
Add more detailed comments for explicit memory barrier used by f2fs, in order to enhance code readability. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index b8c20d29431d..29403540ff6e 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -653,7 +653,11 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi, nid_t ino)
llist_add(&cmd.llnode, &fcc->issue_list);
- /* update issue_list before we wake up issue_flush thread */
+ /*
+ * update issue_list before we wake up issue_flush thread, this
+ * smp_mb() pairs with another barrier in ___wait_event(), see
+ * more details in comments of waitqueue_active().
+ */
smp_mb();
if (waitqueue_active(&fcc->flush_wait_queue))