[PATCH v3] f2fs: fix to avoid race during access gc_thread pointer

2018-05-28 Thread Chao Yu
Thread AThread B - f2fs_remount - stop_gc_thread - f2fs_sbi_store sbi->gc_thread = NULL; access sbi->gc_thread->gc_* Previously, we allocate memory for sbi->gc_thread based on background gc thread mount o

Re: [PATCH v3] f2fs: fix to avoid race during access gc_thread pointer

2018-05-05 Thread Chao Yu
On 2018/5/5 18:02, Chao Yu wrote: > Thread A Thread BThread C > - f2fs_remount > - stop_gc_thread > - f2fs_sbi_store > - issue_discard_thread >sbi->gc_thread = NULL; >

[PATCH v3] f2fs: fix to avoid race during access gc_thread pointer

2018-05-05 Thread Chao Yu
Thread AThread BThread C - f2fs_remount - stop_gc_thread - f2fs_sbi_store - issue_discard_thread sbi->gc_thread = NULL; sbi->gc_threa