diff options
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 64e2b379a350..c82e09bbc5fd 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c | |||
@@ -84,9 +84,6 @@ static int mtd_blktrans_thread(void *arg) | |||
84 | struct request_queue *rq = tr->blkcore_priv->rq; | 84 | struct request_queue *rq = tr->blkcore_priv->rq; |
85 | struct request *req = NULL; | 85 | struct request *req = NULL; |
86 | 86 | ||
87 | /* we might get involved when memory gets low, so use PF_MEMALLOC */ | ||
88 | current->flags |= PF_MEMALLOC; | ||
89 | |||
90 | spin_lock_irq(rq->queue_lock); | 87 | spin_lock_irq(rq->queue_lock); |
91 | 88 | ||
92 | while (!kthread_should_stop()) { | 89 | while (!kthread_should_stop()) { |
@@ -381,7 +378,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr) | |||
381 | tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr, | 378 | tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr, |
382 | "%sd", tr->name); | 379 | "%sd", tr->name); |
383 | if (IS_ERR(tr->blkcore_priv->thread)) { | 380 | if (IS_ERR(tr->blkcore_priv->thread)) { |
384 | int ret = PTR_ERR(tr->blkcore_priv->thread); | 381 | ret = PTR_ERR(tr->blkcore_priv->thread); |
385 | blk_cleanup_queue(tr->blkcore_priv->rq); | 382 | blk_cleanup_queue(tr->blkcore_priv->rq); |
386 | unregister_blkdev(tr->major, tr->name); | 383 | unregister_blkdev(tr->major, tr->name); |
387 | kfree(tr->blkcore_priv); | 384 | kfree(tr->blkcore_priv); |