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/