Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 30 Oct 2010 11:35:11 +0000 (12:35 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 30 Oct 2010 11:35:11 +0000 (12:35 +0100)
Conflicts:
drivers/mtd/mtd_blkdevs.c

Merge Grant's device-tree bits so that we can apply the subsequent fixes.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
1  2 
arch/powerpc/Kconfig
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/devices/m25p80.c
drivers/mtd/maps/Kconfig
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/mtd_blkdevs.c
drivers/mtd/mtdchar.c
drivers/mtd/nand/omap2.c
fs/jffs2/fs.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 63790e975d204087feee6675a1deb1c68f3c6b1f,50ab431b24ebafd456269061ac7a6873c152a57d..f9329794f3b554936f13fda170ddb0d16eb9bc57
@@@ -185,19 -181,20 +185,20 @@@ static int blktrans_open(struct block_d
        if (!dev)
                return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/
  
+       mutex_lock(&mtd_blkdevs_mutex);
        mutex_lock(&dev->lock);
  
 -      if (!dev->mtd) {
 -              ret = -ENXIO;
 +      if (dev->open++)
                goto unlock;
 -      }
  
 -      ret = !dev->open++ && dev->tr->open ? dev->tr->open(dev) : 0;
 +      kref_get(&dev->ref);
 +      __module_get(dev->tr->owner);
 +
 +      if (dev->mtd) {
 +              ret = dev->tr->open ? dev->tr->open(dev) : 0;
 +              __get_mtd_device(dev->mtd);
 +      }
  
 -      /* Take another reference on the device so it won't go away till
 -              last release */
 -      if (!ret)
 -              kref_get(&dev->ref);
  unlock:
        mutex_unlock(&dev->lock);
        blktrans_dev_put(dev);
@@@ -212,18 -210,16 +214,19 @@@ static int blktrans_release(struct gend
        if (!dev)
                return ret;
  
+       mutex_lock(&mtd_blkdevs_mutex);
        mutex_lock(&dev->lock);
  
 -      /* Release one reference, we sure its not the last one here*/
 -      kref_put(&dev->ref, blktrans_dev_release);
 -
 -      if (!dev->mtd)
 +      if (--dev->open)
                goto unlock;
  
 -      ret = !--dev->open && dev->tr->release ? dev->tr->release(dev) : 0;
 +      kref_put(&dev->ref, blktrans_dev_release);
 +      module_put(dev->tr->owner);
 +
 +      if (dev->mtd) {
 +              ret = dev->tr->release ? dev->tr->release(dev) : 0;
 +              __put_mtd_device(dev->mtd);
 +      }
  unlock:
        mutex_unlock(&dev->lock);
        blktrans_dev_put(dev);
Simple merge
Simple merge
diff --cc fs/jffs2/fs.c
Simple merge