diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-03-02 20:01:32 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-02 20:01:32 -0700 |
commit | 764b53b26c9897b0693c934797e898d6cd883a26 (patch) | |
tree | 0095a5db207e2e2811a60319d560be65bd3d3af9 /drivers/md/bcache/alloc.c | |
parent | e959e5405f34aa92d71d0dd162b969c21742061d (diff) | |
download | linux-stable-764b53b26c9897b0693c934797e898d6cd883a26.tar.gz linux-stable-764b53b26c9897b0693c934797e898d6cd883a26.tar.bz2 linux-stable-764b53b26c9897b0693c934797e898d6cd883a26.zip |
Revert "bcache: ignore pending signals when creating gc and allocator thread"
This reverts commit 0b96da639a4874311e9b5156405f69ef9fc3bef8.
We can't just go flushing random signals, under the assumption that the
OOM killer will just do something else. It's not safe from the OOM
perspective, and it could also cause other signals to get randomly lost.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/alloc.c')
-rw-r--r-- | drivers/md/bcache/alloc.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/md/bcache/alloc.c b/drivers/md/bcache/alloc.c index 8bc1faf71ff2..a1df0d95151c 100644 --- a/drivers/md/bcache/alloc.c +++ b/drivers/md/bcache/alloc.c @@ -67,7 +67,6 @@ #include <linux/blkdev.h> #include <linux/kthread.h> #include <linux/random.h> -#include <linux/sched/signal.h> #include <trace/events/bcache.h> #define MAX_OPEN_BUCKETS 128 @@ -734,21 +733,8 @@ int bch_open_buckets_alloc(struct cache_set *c) int bch_cache_allocator_start(struct cache *ca) { - struct task_struct *k; - - /* - * In case previous btree check operation occupies too many - * system memory for bcache btree node cache, and the - * registering process is selected by OOM killer. Here just - * ignore the SIGKILL sent by OOM killer if there is, to - * avoid kthread_run() being failed by pending signals. The - * bcache registering process will exit after the registration - * done. - */ - if (signal_pending(current)) - flush_signals(current); - - k = kthread_run(bch_allocator_thread, ca, "bcache_allocator"); + struct task_struct *k = kthread_run(bch_allocator_thread, + ca, "bcache_allocator"); if (IS_ERR(k)) return PTR_ERR(k); |