diff options
-rw-r--r-- | fs/jffs2/background.c | 8 | ||||
-rw-r--r-- | include/linux/jffs2_fs_sb.h | 4 |
2 files changed, 6 insertions, 6 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 | ||
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h index 350b82bd6529..1e21546622de 100644 --- a/include/linux/jffs2_fs_sb.h +++ b/include/linux/jffs2_fs_sb.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: jffs2_fs_sb.h,v 1.51 2005/02/28 08:21:06 dedekind Exp $ */ | 1 | /* $Id: jffs2_fs_sb.h,v 1.52 2005/05/19 16:12:17 gleixner Exp $ */ |
2 | 2 | ||
3 | #ifndef _JFFS2_FS_SB | 3 | #ifndef _JFFS2_FS_SB |
4 | #define _JFFS2_FS_SB | 4 | #define _JFFS2_FS_SB |
@@ -32,7 +32,7 @@ struct jffs2_sb_info { | |||
32 | unsigned int flags; | 32 | unsigned int flags; |
33 | 33 | ||
34 | struct task_struct *gc_task; /* GC task struct */ | 34 | struct task_struct *gc_task; /* GC task struct */ |
35 | struct semaphore gc_thread_start; /* GC thread start mutex */ | 35 | struct completion gc_thread_start; /* GC thread start completion */ |
36 | struct completion gc_thread_exit; /* GC thread exit completion port */ | 36 | struct completion gc_thread_exit; /* GC thread exit completion port */ |
37 | 37 | ||
38 | struct semaphore alloc_sem; /* Used to protect all the following | 38 | struct semaphore alloc_sem; /* Used to protect all the following |