aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-06 19:35:10 -0400
commit57d326169e878a1a37b2bccd1cf81f6809ee67b9 (patch)
tree86ed74ae4dc2beaebce1c67b8459f1873b777d3a /fs/jffs2
parent7b215de3d0abbc4f6daf2efd19e8809af0564490 (diff)
parent0244756edc4b98c129e92c7061d9f383708cf786 (diff)
Merge branch 'akpm' (patches from Andrew Morton) into next
Merge more updates from Andrew Morton: - Most of the rest of MM. This includes "mark remap_file_pages syscall as deprecated" but the actual "replace remap_file_pages syscall with emulation" is held back. I guess we'll need to work out when to pull the trigger on that one. - various minor cleanups to obscure filesystems - the drivers/rtc queue - hfsplus updates - ufs, hpfs, fatfs, affs, reiserfs - Documentation/ - signals - procfs - cpu hotplug - lib/idr.c - rapidio - sysctl - ipc updates * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (171 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/background.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index 2b60ce1996aa..bb9cebc9ca8a 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -75,10 +75,13 @@ void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
75static int jffs2_garbage_collect_thread(void *_c) 75static int jffs2_garbage_collect_thread(void *_c)
76{ 76{
77 struct jffs2_sb_info *c = _c; 77 struct jffs2_sb_info *c = _c;
78 sigset_t hupmask;
78 79
80 siginitset(&hupmask, sigmask(SIGHUP));
79 allow_signal(SIGKILL); 81 allow_signal(SIGKILL);
80 allow_signal(SIGSTOP); 82 allow_signal(SIGSTOP);
81 allow_signal(SIGCONT); 83 allow_signal(SIGCONT);
84 allow_signal(SIGHUP);
82 85
83 c->gc_task = current; 86 c->gc_task = current;
84 complete(&c->gc_thread_start); 87 complete(&c->gc_thread_start);
@@ -87,7 +90,7 @@ static int jffs2_garbage_collect_thread(void *_c)
87 90
88 set_freezable(); 91 set_freezable();
89 for (;;) { 92 for (;;) {
90 allow_signal(SIGHUP); 93 sigprocmask(SIG_UNBLOCK, &hupmask, NULL);
91 again: 94 again:
92 spin_lock(&c->erase_completion_lock); 95 spin_lock(&c->erase_completion_lock);
93 if (!jffs2_thread_should_wake(c)) { 96 if (!jffs2_thread_should_wake(c)) {
@@ -95,10 +98,9 @@ static int jffs2_garbage_collect_thread(void *_c)
95 spin_unlock(&c->erase_completion_lock); 98 spin_unlock(&c->erase_completion_lock);
96 jffs2_dbg(1, "%s(): sleeping...\n", __func__); 99 jffs2_dbg(1, "%s(): sleeping...\n", __func__);
97 schedule(); 100 schedule();
98 } else 101 } else {
99 spin_unlock(&c->erase_completion_lock); 102 spin_unlock(&c->erase_completion_lock);
100 103 }
101
102 /* Problem - immediately after bootup, the GCD spends a lot 104 /* Problem - immediately after bootup, the GCD spends a lot
103 * of time in places like jffs2_kill_fragtree(); so much so 105 * of time in places like jffs2_kill_fragtree(); so much so
104 * that userspace processes (like gdm and X) are starved 106 * that userspace processes (like gdm and X) are starved
@@ -150,7 +152,7 @@ static int jffs2_garbage_collect_thread(void *_c)
150 } 152 }
151 } 153 }
152 /* We don't want SIGHUP to interrupt us. STOP and KILL are OK though. */ 154 /* We don't want SIGHUP to interrupt us. STOP and KILL are OK though. */
153 disallow_signal(SIGHUP); 155 sigprocmask(SIG_BLOCK, &hupmask, NULL);
154 156
155 jffs2_dbg(1, "%s(): pass\n", __func__); 157 jffs2_dbg(1, "%s(): pass\n", __func__);
156 if (jffs2_garbage_collect_pass(c) == -ENOSPC) { 158 if (jffs2_garbage_collect_pass(c) == -ENOSPC) {