linux/drivers/mtd/devices
Tejun Heo 731edacb75 mtd: fix bdev exclusive open bugs in block2mtd::add_device()
There are two bdev exclusive open bugs.

* open_bdev_exclusive() must not be called with NULL holder.  Use dev
  as the holder.

* open_by_devnum() doesn't open the bdev exclusively but
  block2mtd_free_device() always assumes it.  Explicitly claim the
  bdev.

The latter is rather clumsy but will be simplified with future
blkdev_get/put() cleanups.

- Updated to use local variable @mode to cache FMODE_* masks as
  suggested by Artem Bityutskiy.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <dedekind1@gmail.com>
2010-11-13 11:55:16 +01:00
..
Kconfig Kconfig: Remove useless and sometimes wrong comments 2009-11-09 09:40:56 +01:00
Makefile mtd: small typo in Makefile 2010-03-18 07:53:16 +00:00
block2mtd.c mtd: fix bdev exclusive open bugs in block2mtd::add_device() 2010-11-13 11:55:16 +01:00
doc2000.c [MTD] we don't need no misc devices 2009-03-20 13:16:26 +00:00
doc2001.c [MTD] we don't need no misc devices 2009-03-20 13:16:26 +00:00
doc2001plus.c [MTD] we don't need no misc devices 2009-03-20 13:16:26 +00:00
docecc.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
docprobe.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
lart.c Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
m25p80.c mtd: fix build error in m25p80.c 2010-10-30 12:46:08 +01:00
ms02-nv.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
ms02-nv.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
mtd_dataflash.c mtd: dataflash: remove casts from void 2010-08-02 09:05:46 +01:00
mtdram.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
phram.c mtd: phram: use KBUILD_MODNAME 2010-10-25 01:36:36 +01:00
pmc551.c mtd: Remove obsolete <mtd/compatmac.h> include 2010-08-08 21:19:42 +01:00
slram.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sst25l.c mtd: sst25l: check for null consistently 2010-08-02 09:00:45 +01:00