[<prev] [next>] [day] [month] [year] [list]
Date: Sat, 2 Feb 2013 23:52:42 +0900
From: Namjae Jeon <linkinjeon@...il.com>
To: jaegeuk.kim@...sung.com
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
Namjae Jeon <linkinjeon@...il.com>,
Namjae Jeon <namjae.jeon@...sung.com>,
Amit Sahrawat <a.sahrawat@...sung.com>
Subject: [PATCH 4/6] f2fs: mark gc_thread as NULL when thread creation failed
From: Namjae Jeon <namjae.jeon@...sung.com>
When gc thread creatio 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@...sung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com>
---
fs/f2fs/gc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index d344784..21f3ec6 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -107,6 +107,7 @@ int start_gc_thread(struct f2fs_sb_info *sbi)
"f2fs_gc-%s", dev_name(sbi->sb->s_bdi->dev));
if (IS_ERR(gc_th->f2fs_gc_task)) {
kfree(gc_th);
+ sbi->gc_thread = NULL;
return -ENOMEM;
}
return 0;
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists