[PATCH 1/2] f2fs: avoid race in between atomic_read & atomic_inc

2017-08-31 Thread Chao Yu
Previously, we will miss merging flush command during fsync due to below race condition: Thread AThread BThread C - f2fs_issue_flush - atomic_read(_flush) - f2fs_issue_flush - atomic_read(_flush)

[PATCH 1/2] f2fs: avoid race in between atomic_read & atomic_inc

2017-08-31 Thread Chao Yu
Previously, we will miss merging flush command during fsync due to below race condition: Thread AThread BThread C - f2fs_issue_flush - atomic_read(_flush) - f2fs_issue_flush - atomic_read(_flush)