f2fs: mark gc_thread as NULL when thread creation is failed
authorNamjae Jeon <namjae.jeon@samsung.com>
Sat, 2 Feb 2013 14:52:42 +0000 (23:52 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 11 Feb 2013 22:15:02 +0000 (07:15 +0900)
commit25718423ea6f7118f9c173adff0fac52414571b8
tree8e1604e6c45a8c0e46172fd51122acd059573e7a
parentec7b1f2dd180afb1ce23aa44a7451e59bf2f3eb3
f2fs: mark gc_thread as NULL when thread creation is failed

When gc thread creation is failed, mark gc_thread as NULL to avoid
crash while trying to stop invalid thread in stop_gc_thread->kthread_stop.
Instead make it return from:
if (!gc_th)
       return;

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/gc.c