aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 18:14:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 18:14:53 -0400
commit292088ee032d0df59e7c8a7a00e9b97260146078 (patch)
tree99e5eee404285d4e2b6d282113cccee58236580f /drivers/block
parentbc2d968f0ec698c66750e0ad1c1d35568fe93c05 (diff)
parent254844d3b9959b52fedf2f22810cc66e82a1ca16 (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/block')
-rw-r--r--drivers/block/amiflop.c3
-rw-r--r--drivers/block/aoe/aoeblk.c6
-rw-r--r--drivers/block/ataflop.c5
-rw-r--r--drivers/block/cciss.c5
-rw-r--r--drivers/block/cpqarray.c6
-rw-r--r--drivers/block/drbd/drbd_main.c5
-rw-r--r--drivers/block/floppy.c4
-rw-r--r--drivers/block/loop.c6
-rw-r--r--drivers/block/paride/pcd.c3
-rw-r--r--drivers/block/paride/pd.c4
-rw-r--r--drivers/block/paride/pf.c9
-rw-r--r--drivers/block/pktcdvd.c4
-rw-r--r--drivers/block/rbd.c4
-rw-r--r--drivers/block/swim.c4
-rw-r--r--drivers/block/swim3.c5
-rw-r--r--drivers/block/xen-blkfront.c3
-rw-r--r--drivers/block/xsysace.c3
-rw-r--r--drivers/block/z2ram.c6
18 files changed, 29 insertions, 56 deletions
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 386146d792d1..4ff85b8785ee 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1634,7 +1634,7 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
1634 return 0; 1634 return 0;
1635} 1635}
1636 1636
1637static int floppy_release(struct gendisk *disk, fmode_t mode) 1637static void floppy_release(struct gendisk *disk, fmode_t mode)
1638{ 1638{
1639 struct amiga_floppy_struct *p = disk->private_data; 1639 struct amiga_floppy_struct *p = disk->private_data;
1640 int drive = p - unit; 1640 int drive = p - unit;
@@ -1654,7 +1654,6 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
1654 floppy_off (drive | 0x40000000); 1654 floppy_off (drive | 0x40000000);
1655#endif 1655#endif
1656 mutex_unlock(&amiflop_mutex); 1656 mutex_unlock(&amiflop_mutex);
1657 return 0;
1658} 1657}
1659 1658
1660/* 1659/*
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index a129f8c8073d..916d9ed5c8aa 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -169,7 +169,7 @@ aoeblk_open(struct block_device *bdev, fmode_t mode)
169 return -ENODEV; 169 return -ENODEV;
170} 170}
171 171
172static int 172static void
173aoeblk_release(struct gendisk *disk, fmode_t mode) 173aoeblk_release(struct gendisk *disk, fmode_t mode)
174{ 174{
175 struct aoedev *d = disk->private_data; 175 struct aoedev *d = disk->private_data;
@@ -180,11 +180,9 @@ aoeblk_release(struct gendisk *disk, fmode_t mode)
180 if (--d->nopen == 0) { 180 if (--d->nopen == 0) {
181 spin_unlock_irqrestore(&d->lock, flags); 181 spin_unlock_irqrestore(&d->lock, flags);
182 aoecmd_cfg(d->aoemajor, d->aoeminor); 182 aoecmd_cfg(d->aoemajor, d->aoeminor);
183 return 0; 183 return;
184 } 184 }
185 spin_unlock_irqrestore(&d->lock, flags); 185 spin_unlock_irqrestore(&d->lock, flags);
186
187 return 0;
188} 186}
189 187
190static void 188static void
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index ede16c64ff07..0e30c6e5492a 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -367,7 +367,7 @@ static void fd_probe( int drive );
367static int fd_test_drive_present( int drive ); 367static int fd_test_drive_present( int drive );
368static void config_types( void ); 368static void config_types( void );
369static int floppy_open(struct block_device *bdev, fmode_t mode); 369static int floppy_open(struct block_device *bdev, fmode_t mode);
370static int floppy_release(struct gendisk *disk, fmode_t mode); 370static void floppy_release(struct gendisk *disk, fmode_t mode);
371 371
372/************************* End of Prototypes **************************/ 372/************************* End of Prototypes **************************/
373 373
@@ -1886,7 +1886,7 @@ static int floppy_unlocked_open(struct block_device *bdev, fmode_t mode)
1886 return ret; 1886 return ret;
1887} 1887}
1888 1888
1889static int floppy_release(struct gendisk *disk, fmode_t mode) 1889static void floppy_release(struct gendisk *disk, fmode_t mode)
1890{ 1890{
1891 struct atari_floppy_struct *p = disk->private_data; 1891 struct atari_floppy_struct *p = disk->private_data;
1892 mutex_lock(&ataflop_mutex); 1892 mutex_lock(&ataflop_mutex);
@@ -1897,7 +1897,6 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
1897 p->ref = 0; 1897 p->ref = 0;
1898 } 1898 }
1899 mutex_unlock(&ataflop_mutex); 1899 mutex_unlock(&ataflop_mutex);
1900 return 0;
1901} 1900}
1902 1901
1903static const struct block_device_operations floppy_fops = { 1902static const struct block_device_operations floppy_fops = {
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index e18c99140c0a..94b51c5e0678 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -161,7 +161,7 @@ static irqreturn_t do_cciss_intx(int irq, void *dev_id);
161static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id); 161static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id);
162static int cciss_open(struct block_device *bdev, fmode_t mode); 162static int cciss_open(struct block_device *bdev, fmode_t mode);
163static int cciss_unlocked_open(struct block_device *bdev, fmode_t mode); 163static int cciss_unlocked_open(struct block_device *bdev, fmode_t mode);
164static int cciss_release(struct gendisk *disk, fmode_t mode); 164static void cciss_release(struct gendisk *disk, fmode_t mode);
165static int do_ioctl(struct block_device *bdev, fmode_t mode, 165static int do_ioctl(struct block_device *bdev, fmode_t mode,
166 unsigned int cmd, unsigned long arg); 166 unsigned int cmd, unsigned long arg);
167static int cciss_ioctl(struct block_device *bdev, fmode_t mode, 167static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
@@ -1123,7 +1123,7 @@ static int cciss_unlocked_open(struct block_device *bdev, fmode_t mode)
1123/* 1123/*
1124 * Close. Sync first. 1124 * Close. Sync first.
1125 */ 1125 */
1126static int cciss_release(struct gendisk *disk, fmode_t mode) 1126static void cciss_release(struct gendisk *disk, fmode_t mode)
1127{ 1127{
1128 ctlr_info_t *h; 1128 ctlr_info_t *h;
1129 drive_info_struct *drv; 1129 drive_info_struct *drv;
@@ -1135,7 +1135,6 @@ static int cciss_release(struct gendisk *disk, fmode_t mode)
1135 drv->usage_count--; 1135 drv->usage_count--;
1136 h->usage_count--; 1136 h->usage_count--;
1137 mutex_unlock(&cciss_mutex); 1137 mutex_unlock(&cciss_mutex);
1138 return 0;
1139} 1138}
1140 1139
1141static int do_ioctl(struct block_device *bdev, fmode_t mode, 1140static int do_ioctl(struct block_device *bdev, fmode_t mode,
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index 3b9e8ebcb96b..639d26b90b91 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -160,7 +160,7 @@ static int sendcmd(
160 unsigned int log_unit ); 160 unsigned int log_unit );
161 161
162static int ida_unlocked_open(struct block_device *bdev, fmode_t mode); 162static int ida_unlocked_open(struct block_device *bdev, fmode_t mode);
163static int ida_release(struct gendisk *disk, fmode_t mode); 163static void ida_release(struct gendisk *disk, fmode_t mode);
164static int ida_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg); 164static int ida_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg);
165static int ida_getgeo(struct block_device *bdev, struct hd_geometry *geo); 165static int ida_getgeo(struct block_device *bdev, struct hd_geometry *geo);
166static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io); 166static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io);
@@ -856,7 +856,7 @@ static int ida_unlocked_open(struct block_device *bdev, fmode_t mode)
856/* 856/*
857 * Close. Sync first. 857 * Close. Sync first.
858 */ 858 */
859static int ida_release(struct gendisk *disk, fmode_t mode) 859static void ida_release(struct gendisk *disk, fmode_t mode)
860{ 860{
861 ctlr_info_t *host; 861 ctlr_info_t *host;
862 862
@@ -864,8 +864,6 @@ static int ida_release(struct gendisk *disk, fmode_t mode)
864 host = get_host(disk); 864 host = get_host(disk);
865 host->usage_count--; 865 host->usage_count--;
866 mutex_unlock(&cpqarray_mutex); 866 mutex_unlock(&cpqarray_mutex);
867
868 return 0;
869} 867}
870 868
871/* 869/*
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index e98da675f0c1..298b868910dc 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -63,7 +63,7 @@ int drbd_asender(struct drbd_thread *);
63 63
64int drbd_init(void); 64int drbd_init(void);
65static int drbd_open(struct block_device *bdev, fmode_t mode); 65static int drbd_open(struct block_device *bdev, fmode_t mode);
66static int drbd_release(struct gendisk *gd, fmode_t mode); 66static void drbd_release(struct gendisk *gd, fmode_t mode);
67static int w_md_sync(struct drbd_work *w, int unused); 67static int w_md_sync(struct drbd_work *w, int unused);
68static void md_sync_timer_fn(unsigned long data); 68static void md_sync_timer_fn(unsigned long data);
69static int w_bitmap_io(struct drbd_work *w, int unused); 69static int w_bitmap_io(struct drbd_work *w, int unused);
@@ -1849,13 +1849,12 @@ static int drbd_open(struct block_device *bdev, fmode_t mode)
1849 return rv; 1849 return rv;
1850} 1850}
1851 1851
1852static int drbd_release(struct gendisk *gd, fmode_t mode) 1852static void drbd_release(struct gendisk *gd, fmode_t mode)
1853{ 1853{
1854 struct drbd_conf *mdev = gd->private_data; 1854 struct drbd_conf *mdev = gd->private_data;
1855 mutex_lock(&drbd_main_mutex); 1855 mutex_lock(&drbd_main_mutex);
1856 mdev->open_cnt--; 1856 mdev->open_cnt--;
1857 mutex_unlock(&drbd_main_mutex); 1857 mutex_unlock(&drbd_main_mutex);
1858 return 0;
1859} 1858}
1860 1859
1861static void drbd_set_defaults(struct drbd_conf *mdev) 1860static void drbd_set_defaults(struct drbd_conf *mdev)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 2ddd64a9ffde..c49e85608101 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3601,7 +3601,7 @@ static void __init config_types(void)
3601 pr_cont("\n"); 3601 pr_cont("\n");
3602} 3602}
3603 3603
3604static int floppy_release(struct gendisk *disk, fmode_t mode) 3604static void floppy_release(struct gendisk *disk, fmode_t mode)
3605{ 3605{
3606 int drive = (long)disk->private_data; 3606 int drive = (long)disk->private_data;
3607 3607
@@ -3615,8 +3615,6 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
3615 opened_bdev[drive] = NULL; 3615 opened_bdev[drive] = NULL;
3616 mutex_unlock(&open_lock); 3616 mutex_unlock(&open_lock);
3617 mutex_unlock(&floppy_mutex); 3617 mutex_unlock(&floppy_mutex);
3618
3619 return 0;
3620} 3618}
3621 3619
3622/* 3620/*
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index b2955b3f2cbc..d92d50fd84b7 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1518,7 +1518,7 @@ out:
1518 return err; 1518 return err;
1519} 1519}
1520 1520
1521static int lo_release(struct gendisk *disk, fmode_t mode) 1521static void lo_release(struct gendisk *disk, fmode_t mode)
1522{ 1522{
1523 struct loop_device *lo = disk->private_data; 1523 struct loop_device *lo = disk->private_data;
1524 int err; 1524 int err;
@@ -1535,7 +1535,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
1535 */ 1535 */
1536 err = loop_clr_fd(lo); 1536 err = loop_clr_fd(lo);
1537 if (!err) 1537 if (!err)
1538 goto out_unlocked; 1538 return;
1539 } else { 1539 } else {
1540 /* 1540 /*
1541 * Otherwise keep thread (if running) and config, 1541 * Otherwise keep thread (if running) and config,
@@ -1546,8 +1546,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
1546 1546
1547out: 1547out:
1548 mutex_unlock(&lo->lo_ctl_mutex); 1548 mutex_unlock(&lo->lo_ctl_mutex);
1549out_unlocked:
1550 return 0;
1551} 1549}
1552 1550
1553static const struct block_device_operations lo_fops = { 1551static const struct block_device_operations lo_fops = {
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index ba2b6b5e5910..e76bdc074dbe 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -236,13 +236,12 @@ static int pcd_block_open(struct block_device *bdev, fmode_t mode)
236 return ret; 236 return ret;
237} 237}
238 238
239static int pcd_block_release(struct gendisk *disk, fmode_t mode) 239static void pcd_block_release(struct gendisk *disk, fmode_t mode)
240{ 240{
241 struct pcd_unit *cd = disk->private_data; 241 struct pcd_unit *cd = disk->private_data;
242 mutex_lock(&pcd_mutex); 242 mutex_lock(&pcd_mutex);
243 cdrom_release(&cd->info, mode); 243 cdrom_release(&cd->info, mode);
244 mutex_unlock(&pcd_mutex); 244 mutex_unlock(&pcd_mutex);
245 return 0;
246} 245}
247 246
248static int pcd_block_ioctl(struct block_device *bdev, fmode_t mode, 247static int pcd_block_ioctl(struct block_device *bdev, fmode_t mode,
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 831e3ac156e6..19ad8f0c83ef 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -783,7 +783,7 @@ static int pd_ioctl(struct block_device *bdev, fmode_t mode,
783 } 783 }
784} 784}
785 785
786static int pd_release(struct gendisk *p, fmode_t mode) 786static void pd_release(struct gendisk *p, fmode_t mode)
787{ 787{
788 struct pd_unit *disk = p->private_data; 788 struct pd_unit *disk = p->private_data;
789 789
@@ -791,8 +791,6 @@ static int pd_release(struct gendisk *p, fmode_t mode)
791 if (!--disk->access && disk->removable) 791 if (!--disk->access && disk->removable)
792 pd_special_command(disk, pd_door_unlock); 792 pd_special_command(disk, pd_door_unlock);
793 mutex_unlock(&pd_mutex); 793 mutex_unlock(&pd_mutex);
794
795 return 0;
796} 794}
797 795
798static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing) 796static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing)
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index ec8f9ed6326e..f5c86d523ba0 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -211,7 +211,7 @@ static int pf_ioctl(struct block_device *bdev, fmode_t mode,
211 unsigned int cmd, unsigned long arg); 211 unsigned int cmd, unsigned long arg);
212static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); 212static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo);
213 213
214static int pf_release(struct gendisk *disk, fmode_t mode); 214static void pf_release(struct gendisk *disk, fmode_t mode);
215 215
216static int pf_detect(void); 216static int pf_detect(void);
217static void do_pf_read(void); 217static void do_pf_read(void);
@@ -360,14 +360,15 @@ static int pf_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, u
360 return 0; 360 return 0;
361} 361}
362 362
363static int pf_release(struct gendisk *disk, fmode_t mode) 363static void pf_release(struct gendisk *disk, fmode_t mode)
364{ 364{
365 struct pf_unit *pf = disk->private_data; 365 struct pf_unit *pf = disk->private_data;
366 366
367 mutex_lock(&pf_mutex); 367 mutex_lock(&pf_mutex);
368 if (pf->access <= 0) { 368 if (pf->access <= 0) {
369 mutex_unlock(&pf_mutex); 369 mutex_unlock(&pf_mutex);
370 return -EINVAL; 370 WARN_ON(1);
371 return;
371 } 372 }
372 373
373 pf->access--; 374 pf->access--;
@@ -376,8 +377,6 @@ static int pf_release(struct gendisk *disk, fmode_t mode)
376 pf_lock(pf, 0); 377 pf_lock(pf, 0);
377 378
378 mutex_unlock(&pf_mutex); 379 mutex_unlock(&pf_mutex);
379 return 0;
380
381} 380}
382 381
383static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing) 382static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing)
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index e0588c6dd86f..9f2d348f7115 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2376,10 +2376,9 @@ out:
2376 return ret; 2376 return ret;
2377} 2377}
2378 2378
2379static int pkt_close(struct gendisk *disk, fmode_t mode) 2379static void pkt_close(struct gendisk *disk, fmode_t mode)
2380{ 2380{
2381 struct pktcdvd_device *pd = disk->private_data; 2381 struct pktcdvd_device *pd = disk->private_data;
2382 int ret = 0;
2383 2382
2384 mutex_lock(&pktcdvd_mutex); 2383 mutex_lock(&pktcdvd_mutex);
2385 mutex_lock(&ctl_mutex); 2384 mutex_lock(&ctl_mutex);
@@ -2391,7 +2390,6 @@ static int pkt_close(struct gendisk *disk, fmode_t mode)
2391 } 2390 }
2392 mutex_unlock(&ctl_mutex); 2391 mutex_unlock(&ctl_mutex);
2393 mutex_unlock(&pktcdvd_mutex); 2392 mutex_unlock(&pktcdvd_mutex);
2394 return ret;
2395} 2393}
2396 2394
2397 2395
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index c2ca1818f335..22ffd5dcb168 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -460,7 +460,7 @@ static int rbd_open(struct block_device *bdev, fmode_t mode)
460 return 0; 460 return 0;
461} 461}
462 462
463static int rbd_release(struct gendisk *disk, fmode_t mode) 463static void rbd_release(struct gendisk *disk, fmode_t mode)
464{ 464{
465 struct rbd_device *rbd_dev = disk->private_data; 465 struct rbd_device *rbd_dev = disk->private_data;
466 unsigned long open_count_before; 466 unsigned long open_count_before;
@@ -473,8 +473,6 @@ static int rbd_release(struct gendisk *disk, fmode_t mode)
473 mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); 473 mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
474 put_device(&rbd_dev->dev); 474 put_device(&rbd_dev->dev);
475 mutex_unlock(&ctl_mutex); 475 mutex_unlock(&ctl_mutex);
476
477 return 0;
478} 476}
479 477
480static const struct block_device_operations rbd_bd_ops = { 478static const struct block_device_operations rbd_bd_ops = {
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 8766a2257091..2f445b7a174e 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -673,7 +673,7 @@ static int floppy_unlocked_open(struct block_device *bdev, fmode_t mode)
673 return ret; 673 return ret;
674} 674}
675 675
676static int floppy_release(struct gendisk *disk, fmode_t mode) 676static void floppy_release(struct gendisk *disk, fmode_t mode)
677{ 677{
678 struct floppy_state *fs = disk->private_data; 678 struct floppy_state *fs = disk->private_data;
679 struct swim __iomem *base = fs->swd->base; 679 struct swim __iomem *base = fs->swd->base;
@@ -687,8 +687,6 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
687 if (fs->ref_count == 0) 687 if (fs->ref_count == 0)
688 swim_motor(base, OFF); 688 swim_motor(base, OFF);
689 mutex_unlock(&swim_mutex); 689 mutex_unlock(&swim_mutex);
690
691 return 0;
692} 690}
693 691
694static int floppy_ioctl(struct block_device *bdev, fmode_t mode, 692static int floppy_ioctl(struct block_device *bdev, fmode_t mode,
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 758f2ac878cf..20e061c3e023 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -251,7 +251,7 @@ static int fd_eject(struct floppy_state *fs);
251static int floppy_ioctl(struct block_device *bdev, fmode_t mode, 251static int floppy_ioctl(struct block_device *bdev, fmode_t mode,
252 unsigned int cmd, unsigned long param); 252 unsigned int cmd, unsigned long param);
253static int floppy_open(struct block_device *bdev, fmode_t mode); 253static int floppy_open(struct block_device *bdev, fmode_t mode);
254static int floppy_release(struct gendisk *disk, fmode_t mode); 254static void floppy_release(struct gendisk *disk, fmode_t mode);
255static unsigned int floppy_check_events(struct gendisk *disk, 255static unsigned int floppy_check_events(struct gendisk *disk,
256 unsigned int clearing); 256 unsigned int clearing);
257static int floppy_revalidate(struct gendisk *disk); 257static int floppy_revalidate(struct gendisk *disk);
@@ -1017,7 +1017,7 @@ static int floppy_unlocked_open(struct block_device *bdev, fmode_t mode)
1017 return ret; 1017 return ret;
1018} 1018}
1019 1019
1020static int floppy_release(struct gendisk *disk, fmode_t mode) 1020static void floppy_release(struct gendisk *disk, fmode_t mode)
1021{ 1021{
1022 struct floppy_state *fs = disk->private_data; 1022 struct floppy_state *fs = disk->private_data;
1023 struct swim3 __iomem *sw = fs->swim3; 1023 struct swim3 __iomem *sw = fs->swim3;
@@ -1029,7 +1029,6 @@ static int floppy_release(struct gendisk *disk, fmode_t mode)
1029 swim3_select(fs, RELAX); 1029 swim3_select(fs, RELAX);
1030 } 1030 }
1031 mutex_unlock(&swim3_mutex); 1031 mutex_unlock(&swim3_mutex);
1032 return 0;
1033} 1032}
1034 1033
1035static unsigned int floppy_check_events(struct gendisk *disk, 1034static unsigned int floppy_check_events(struct gendisk *disk,
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index a894f88762d8..d89ef86220f4 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1617,7 +1617,7 @@ out:
1617 return err; 1617 return err;
1618} 1618}
1619 1619
1620static int blkif_release(struct gendisk *disk, fmode_t mode) 1620static void blkif_release(struct gendisk *disk, fmode_t mode)
1621{ 1621{
1622 struct blkfront_info *info = disk->private_data; 1622 struct blkfront_info *info = disk->private_data;
1623 struct block_device *bdev; 1623 struct block_device *bdev;
@@ -1658,7 +1658,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
1658out: 1658out:
1659 bdput(bdev); 1659 bdput(bdev);
1660 mutex_unlock(&blkfront_mutex); 1660 mutex_unlock(&blkfront_mutex);
1661 return 0;
1662} 1661}
1663 1662
1664static const struct block_device_operations xlvbd_block_fops = 1663static const struct block_device_operations xlvbd_block_fops =
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 1f38643173ca..f8ef15f37c5e 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -915,7 +915,7 @@ static int ace_open(struct block_device *bdev, fmode_t mode)
915 return 0; 915 return 0;
916} 916}
917 917
918static int ace_release(struct gendisk *disk, fmode_t mode) 918static void ace_release(struct gendisk *disk, fmode_t mode)
919{ 919{
920 struct ace_device *ace = disk->private_data; 920 struct ace_device *ace = disk->private_data;
921 unsigned long flags; 921 unsigned long flags;
@@ -932,7 +932,6 @@ static int ace_release(struct gendisk *disk, fmode_t mode)
932 } 932 }
933 spin_unlock_irqrestore(&ace->lock, flags); 933 spin_unlock_irqrestore(&ace->lock, flags);
934 mutex_unlock(&xsysace_mutex); 934 mutex_unlock(&xsysace_mutex);
935 return 0;
936} 935}
937 936
938static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo) 937static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo)
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index a22e3f895947..5a95baf4b104 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -309,20 +309,18 @@ err_out:
309 return rc; 309 return rc;
310} 310}
311 311
312static int 312static void
313z2_release(struct gendisk *disk, fmode_t mode) 313z2_release(struct gendisk *disk, fmode_t mode)
314{ 314{
315 mutex_lock(&z2ram_mutex); 315 mutex_lock(&z2ram_mutex);
316 if ( current_device == -1 ) { 316 if ( current_device == -1 ) {
317 mutex_unlock(&z2ram_mutex); 317 mutex_unlock(&z2ram_mutex);
318 return 0; 318 return;
319 } 319 }
320 mutex_unlock(&z2ram_mutex); 320 mutex_unlock(&z2ram_mutex);
321 /* 321 /*
322 * FIXME: unmap memory 322 * FIXME: unmap memory
323 */ 323 */
324
325 return 0;
326} 324}
327 325
328static const struct block_device_operations z2_fops = 326static const struct block_device_operations z2_fops =