diff options
Diffstat (limited to 'fs/jffs2/background.c')
-rw-r--r-- | fs/jffs2/background.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c index 6eb3daebd563..0c82dfcfd246 100644 --- a/fs/jffs2/background.c +++ b/fs/jffs2/background.c | |||
@@ -1,14 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * JFFS2 -- Journalling Flash File System, Version 2. | 2 | * JFFS2 -- Journalling Flash File System, Version 2. |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2003 Red Hat, Inc. | 4 | * Copyright © 2001-2007 Red Hat, Inc. |
5 | * | 5 | * |
6 | * Created by David Woodhouse <dwmw2@infradead.org> | 6 | * Created by David Woodhouse <dwmw2@infradead.org> |
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.54 2005/05/20 21:37:12 gleixner Exp $ | ||
11 | * | ||
12 | */ | 10 | */ |
13 | 11 | ||
14 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
@@ -99,7 +97,13 @@ static int jffs2_garbage_collect_thread(void *_c) | |||
99 | if (try_to_freeze()) | 97 | if (try_to_freeze()) |
100 | continue; | 98 | continue; |
101 | 99 | ||
102 | cond_resched(); | 100 | /* This thread is purely an optimisation. But if it runs when |
101 | other things could be running, it actually makes things a | ||
102 | lot worse. Use yield() and put it at the back of the runqueue | ||
103 | every time. Especially during boot, pulling an inode in | ||
104 | with read_inode() is much preferable to having the GC thread | ||
105 | get there first. */ | ||
106 | yield(); | ||
103 | 107 | ||
104 | /* Put_super will send a SIGKILL and then wait on the sem. | 108 | /* Put_super will send a SIGKILL and then wait on the sem. |
105 | */ | 109 | */ |