Re: [PATCH] mtdblock: introduce mtdblks_lock

Artem Bityutskiy
2009-07-15T07:42:57Z

On Tue, 2009-07-14 at 22:04 +0200, Matthias Kaehlcke wrote:
> +static struct mutex mtdblks_lock;
> +
> /*
> * Cache stuff...
> *
> @@ -270,6 +272,8 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
>
> DEBUG(MTD_DEBUG_LEVEL1,"mtdblock_open\n");
>
> + mutex_lock(&mtdblks_lock);
> +
> if (mtdblks[dev]) {
> mtdblks[dev]->count++;
> return 0;

Now about unlocking the mutex here?

--
Best regards,
Artem Bityutskiy (Битюцкий Артём)