diff options
Diffstat (limited to 'fs/jffs2/background.c')
-rw-r--r-- | fs/jffs2/background.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 1be6de27dd81..5548749bacb6 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: background.c,v 1.50 2004/11/16 20:36:10 dwmw2 Exp $ | 10 | * $Id: background.c,v 1.52 2005/05/19 16:18:08 gleixner Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -37,7 +37,7 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c) | |||
37 | if (c->gc_task) | 37 | if (c->gc_task) |
38 | BUG(); | 38 | BUG(); |
39 | 39 | ||
40 | init_MUTEX_LOCKED(&c->gc_thread_start); | 40 | init_completion(&c->gc_thread_start); |
41 | init_completion(&c->gc_thread_exit); | 41 | init_completion(&c->gc_thread_exit); |
42 | 42 | ||
43 | pid = kernel_thread(jffs2_garbage_collect_thread, c, CLONE_FS|CLONE_FILES); | 43 | pid = kernel_thread(jffs2_garbage_collect_thread, c, CLONE_FS|CLONE_FILES); |
@@ -48,7 +48,7 @@ int jffs2_start_garbage_collect_thread(struct jffs2_sb_info *c) | |||
48 | } else { | 48 | } else { |
49 | /* Wait for it... */ | 49 | /* Wait for it... */ |
50 | D1(printk(KERN_DEBUG "JFFS2: Garbage collect thread is pid %d\n", pid)); | 50 | D1(printk(KERN_DEBUG "JFFS2: Garbage collect thread is pid %d\n", pid)); |
51 | down(&c->gc_thread_start); | 51 | wait_for_completion(&c->gc_thread_start); |
52 | } | 52 | } |
53 | 53 | ||
54 | return ret; | 54 | return ret; |
@@ -75,7 +75,7 @@ static int jffs2_garbage_collect_thread(void *_c) | |||
75 | allow_signal(SIGCONT); | 75 | allow_signal(SIGCONT); |
76 | 76 | ||
77 | c->gc_task = current; | 77 | c->gc_task = current; |
78 | up(&c->gc_thread_start); | 78 | complete(&c->gc_thread_start); |
79 | 79 | ||
80 | set_user_nice(current, 10); | 80 | set_user_nice(current, 10); |
81 | 81 | ||