Re: [PATCH] 2.5.19 : drivers/mtd/nftlcore.c

Jens Axboe (axboe@suse.de)
Fri, 31 May 2002 09:14:25 +0200


On Thu, May 30 2002, Frank Davis wrote:
> @@ -899,7 +899,7 @@
> DEBUG(MTD_DEBUG_LEVEL2,"NFTL read request completed OK\n");
> up(&nftl->mutex);
> goto repeat;
> - } else if (req->cmd == WRITE) {
> + } else if ((int)req->cmd == WRITE) {

Irk, this is very wrong :-)

} else if (rq_data_dir(rq) == WRITE) {

should work.

> @@ -1015,10 +1015,11 @@
> };
>
> extern char nftlmountrev[];
> +static spinlock_t nftl_lock = SPIN_LOCK_UNLOCKED;
>
> int __init init_nftl(void)
> {
> - int i;
> +spin_lock_init(&nftl_lock);

You don't need the spin_lock_init(), you just set it SPIN_LOCK_UNLOCKED
above.

The rest looks ok.

-- 
Jens Axboe

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/