mtd: don't use PF_MEMALLOC
[safe/jmp/linux-2.6] / drivers / mtd / mtd_blkdevs.c
index 7baba40..fa83757 100644 (file)
@@ -91,9 +91,6 @@ static int mtd_blktrans_thread(void *arg)
        struct request_queue *rq = tr->blkcore_priv->rq;
        struct request *req = NULL;
 
-       /* we might get involved when memory gets low, so use PF_MEMALLOC */
-       current->flags |= PF_MEMALLOC;
-
        spin_lock_irq(rq->queue_lock);
 
        while (!kthread_should_stop()) {
@@ -210,7 +207,7 @@ static int blktrans_ioctl(struct block_device *bdev, fmode_t mode,
        }
 }
 
-static struct block_device_operations mtd_blktrans_ops = {
+static const struct block_device_operations mtd_blktrans_ops = {
        .owner          = THIS_MODULE,
        .open           = blktrans_open,
        .release        = blktrans_release,
@@ -388,7 +385,7 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
        tr->blkcore_priv->thread = kthread_run(mtd_blktrans_thread, tr,
                        "%sd", tr->name);
        if (IS_ERR(tr->blkcore_priv->thread)) {
-               int ret = PTR_ERR(tr->blkcore_priv->thread);
+               ret = PTR_ERR(tr->blkcore_priv->thread);
                blk_cleanup_queue(tr->blkcore_priv->rq);
                unregister_blkdev(tr->major, tr->name);
                kfree(tr->blkcore_priv);