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/s390 | |
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/s390')
-rw-r--r-- | drivers/s390/block/dasd.c | 18 | ||||
-rw-r--r-- | drivers/s390/block/dcssblk.c | 12 | ||||
-rw-r--r-- | drivers/s390/block/scm_blk.c | 3 |
3 files changed, 12 insertions, 21 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 82758cbb220..4361d9772c4 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -2997,18 +2997,14 @@ unlock: return rc; } -static int dasd_release(struct gendisk *disk, fmode_t mode) +static void dasd_release(struct gendisk *disk, fmode_t mode) { - struct dasd_device *base; - - base = dasd_device_from_gendisk(disk); - if (!base) - return -ENODEV; - - atomic_dec(&base->block->open_count); - module_put(base->discipline->owner); - dasd_put_device(base); - return 0; + struct dasd_device *base = dasd_device_from_gendisk(disk); + if (base) { + atomic_dec(&base->block->open_count); + module_put(base->discipline->owner); + dasd_put_device(base); + } } /* diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index b6ad0de0793..07ba32b07fb 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -26,7 +26,7 @@ #define DCSS_BUS_ID_SIZE 20 static int dcssblk_open(struct block_device *bdev, fmode_t mode); -static int dcssblk_release(struct gendisk *disk, fmode_t mode); +static void dcssblk_release(struct gendisk *disk, fmode_t mode); static void dcssblk_make_request(struct request_queue *q, struct bio *bio); static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum, void **kaddr, unsigned long *pfn); @@ -781,16 +781,15 @@ out: return rc; } -static int +static void dcssblk_release(struct gendisk *disk, fmode_t mode) { struct dcssblk_dev_info *dev_info = disk->private_data; struct segment_info *entry; - int rc; if (!dev_info) { - rc = -ENODEV; - goto out; + WARN_ON(1); + return; } down_write(&dcssblk_devices_sem); if (atomic_dec_and_test(&dev_info->use_count) @@ -803,9 +802,6 @@ dcssblk_release(struct gendisk *disk, fmode_t mode) dev_info->save_pending = 0; } up_write(&dcssblk_devices_sem); - rc = 0; -out: - return rc; } static void diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c index b303cab76a7..5d73e6e49af 100644 --- a/drivers/s390/block/scm_blk.c +++ b/drivers/s390/block/scm_blk.c @@ -123,10 +123,9 @@ static int scm_open(struct block_device *blkdev, fmode_t mode) return scm_get_ref(); } -static int scm_release(struct gendisk *gendisk, fmode_t mode) +static void scm_release(struct gendisk *gendisk, fmode_t mode) { scm_put_ref(); - return 0; } static const struct block_device_operations scm_blk_devops = { |