diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 15:14:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 15:14:53 -0700 |
commit | 292088ee032d0df59e7c8a7a00e9b97260146078 (patch) | |
tree | 99e5eee404285d4e2b6d282113cccee58236580f /drivers/mtd | |
parent | bc2d968f0ec698c66750e0ad1c1d35568fe93c05 (diff) | |
parent | 254844d3b9959b52fedf2f22810cc66e82a1ca16 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro:
"A couple of fixes + getting rid of __blkdev_put() return value"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
proc: Use PDE attribute setting accessor functions
make blkdev_put() return void
block_device_operations->release() should return void
mtd_blktrans_ops->release() should return void
hfs: SMP race on directory close()
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 9 | ||||
-rw-r--r-- | drivers/mtd/mtdblock.c | 4 | ||||
-rw-r--r-- | drivers/mtd/sm_ftl.c | 3 |
3 files changed, 6 insertions, 10 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 5ad39bb5ab4..5073cbc796d 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -237,13 +237,12 @@ error_put: return ret; } -static int blktrans_release(struct gendisk *disk, fmode_t mode) +static void blktrans_release(struct gendisk *disk, fmode_t mode) { struct mtd_blktrans_dev *dev = blktrans_dev_get(disk); - int ret = 0; if (!dev) - return ret; + return; mutex_lock(&dev->lock); @@ -254,13 +253,13 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode) module_put(dev->tr->owner); if (dev->mtd) { - ret = dev->tr->release ? dev->tr->release(dev) : 0; + if (dev->tr->release) + dev->tr->release(dev); __put_mtd_device(dev->mtd); } unlock: mutex_unlock(&dev->lock); blktrans_dev_put(dev); - return ret; } static int blktrans_getgeo(struct block_device *bdev, struct hd_geometry *geo) diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index 6c6d80736fa..2aef5dda522 100644 --- a/drivers/mtd/mtdblock.c +++ b/drivers/mtd/mtdblock.c @@ -308,7 +308,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd) return 0; } -static int mtdblock_release(struct mtd_blktrans_dev *mbd) +static void mtdblock_release(struct mtd_blktrans_dev *mbd) { struct mtdblk_dev *mtdblk = container_of(mbd, struct mtdblk_dev, mbd); @@ -333,8 +333,6 @@ static int mtdblock_release(struct mtd_blktrans_dev *mbd) mutex_unlock(&mtdblks_lock); pr_debug("ok\n"); - - return 0; } static int mtdblock_flush(struct mtd_blktrans_dev *dev) diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index 8dd6ba52404..f9d5615c572 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c @@ -1107,7 +1107,7 @@ static int sm_flush(struct mtd_blktrans_dev *dev) } /* outside interface: device is released */ -static int sm_release(struct mtd_blktrans_dev *dev) +static void sm_release(struct mtd_blktrans_dev *dev) { struct sm_ftl *ftl = dev->priv; @@ -1116,7 +1116,6 @@ static int sm_release(struct mtd_blktrans_dev *dev) cancel_work_sync(&ftl->flush_work); sm_cache_flush(ftl); mutex_unlock(&ftl->mutex); - return 0; } /* outside interface: get geometry */ |