[PATCH] mtdblock: introduce mtdblks_lock
Matthias Kaehlcke
matthias at kaehlcke.net
Wed Jul 15 04:36:03 EDT 2009
El Wed, Jul 15, 2009 at 10:41:54AM +0300 Artem Bityutskiy ha dit:
> 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?
i missed this one ...
thanks for your review. i'm going fix that and send out an updated
version of the patch
--
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona
They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety
(Benjamin Franklin)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
More information about the linux-mtd
mailing list