diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 18:14:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-07 18:14:53 -0400 |
commit | 292088ee032d0df59e7c8a7a00e9b97260146078 (patch) | |
tree | 99e5eee404285d4e2b6d282113cccee58236580f /drivers/block | |
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/block')
-rw-r--r-- | drivers/block/amiflop.c | 3 | ||||
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 6 | ||||
-rw-r--r-- | drivers/block/ataflop.c | 5 | ||||
-rw-r--r-- | drivers/block/cciss.c | 5 | ||||
-rw-r--r-- | drivers/block/cpqarray.c | 6 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 5 | ||||
-rw-r--r-- | drivers/block/floppy.c | 4 | ||||
-rw-r--r-- | drivers/block/loop.c | 6 | ||||
-rw-r--r-- | drivers/block/paride/pcd.c | 3 | ||||
-rw-r--r-- | drivers/block/paride/pd.c | 4 | ||||
-rw-r--r-- | drivers/block/paride/pf.c | 9 | ||||
-rw-r--r-- | drivers/block/pktcdvd.c | 4 | ||||
-rw-r--r-- | drivers/block/rbd.c | 4 | ||||
-rw-r--r-- | drivers/block/swim.c | 4 | ||||
-rw-r--r-- | drivers/block/swim3.c | 5 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 3 | ||||
-rw-r--r-- | drivers/block/xsysace.c | 3 | ||||
-rw-r--r-- | drivers/block/z2ram.c | 6 |
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 | ||
1637 | static int floppy_release(struct gendisk *disk, fmode_t mode) | 1637 | static 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 | ||
172 | static int | 172 | static void |
173 | aoeblk_release(struct gendisk *disk, fmode_t mode) | 173 | aoeblk_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 | ||
190 | static void | 188 | static 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 ); | |||
367 | static int fd_test_drive_present( int drive ); | 367 | static int fd_test_drive_present( int drive ); |
368 | static void config_types( void ); | 368 | static void config_types( void ); |
369 | static int floppy_open(struct block_device *bdev, fmode_t mode); | 369 | static int floppy_open(struct block_device *bdev, fmode_t mode); |
370 | static int floppy_release(struct gendisk *disk, fmode_t mode); | 370 | static 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 | ||
1889 | static int floppy_release(struct gendisk *disk, fmode_t mode) | 1889 | static 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 | ||
1903 | static const struct block_device_operations floppy_fops = { | 1902 | static 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); | |||
161 | static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id); | 161 | static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id); |
162 | static int cciss_open(struct block_device *bdev, fmode_t mode); | 162 | static int cciss_open(struct block_device *bdev, fmode_t mode); |
163 | static int cciss_unlocked_open(struct block_device *bdev, fmode_t mode); | 163 | static int cciss_unlocked_open(struct block_device *bdev, fmode_t mode); |
164 | static int cciss_release(struct gendisk *disk, fmode_t mode); | 164 | static void cciss_release(struct gendisk *disk, fmode_t mode); |
165 | static int do_ioctl(struct block_device *bdev, fmode_t mode, | 165 | static int do_ioctl(struct block_device *bdev, fmode_t mode, |
166 | unsigned int cmd, unsigned long arg); | 166 | unsigned int cmd, unsigned long arg); |
167 | static int cciss_ioctl(struct block_device *bdev, fmode_t mode, | 167 | static 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 | */ |
1126 | static int cciss_release(struct gendisk *disk, fmode_t mode) | 1126 | static 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 | ||
1141 | static int do_ioctl(struct block_device *bdev, fmode_t mode, | 1140 | static 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 | ||
162 | static int ida_unlocked_open(struct block_device *bdev, fmode_t mode); | 162 | static int ida_unlocked_open(struct block_device *bdev, fmode_t mode); |
163 | static int ida_release(struct gendisk *disk, fmode_t mode); | 163 | static void ida_release(struct gendisk *disk, fmode_t mode); |
164 | static int ida_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg); | 164 | static int ida_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg); |
165 | static int ida_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 165 | static int ida_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
166 | static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io); | 166 | static 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 | */ |
859 | static int ida_release(struct gendisk *disk, fmode_t mode) | 859 | static 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 | ||
64 | int drbd_init(void); | 64 | int drbd_init(void); |
65 | static int drbd_open(struct block_device *bdev, fmode_t mode); | 65 | static int drbd_open(struct block_device *bdev, fmode_t mode); |
66 | static int drbd_release(struct gendisk *gd, fmode_t mode); | 66 | static void drbd_release(struct gendisk *gd, fmode_t mode); |
67 | static int w_md_sync(struct drbd_work *w, int unused); | 67 | static int w_md_sync(struct drbd_work *w, int unused); |
68 | static void md_sync_timer_fn(unsigned long data); | 68 | static void md_sync_timer_fn(unsigned long data); |
69 | static int w_bitmap_io(struct drbd_work *w, int unused); | 69 | static 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 | ||
1852 | static int drbd_release(struct gendisk *gd, fmode_t mode) | 1852 | static 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 | ||
1861 | static void drbd_set_defaults(struct drbd_conf *mdev) | 1860 | static 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 | ||
3604 | static int floppy_release(struct gendisk *disk, fmode_t mode) | 3604 | static 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 | ||
1521 | static int lo_release(struct gendisk *disk, fmode_t mode) | 1521 | static 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 | ||
1547 | out: | 1547 | out: |
1548 | mutex_unlock(&lo->lo_ctl_mutex); | 1548 | mutex_unlock(&lo->lo_ctl_mutex); |
1549 | out_unlocked: | ||
1550 | return 0; | ||
1551 | } | 1549 | } |
1552 | 1550 | ||
1553 | static const struct block_device_operations lo_fops = { | 1551 | static 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 | ||
239 | static int pcd_block_release(struct gendisk *disk, fmode_t mode) | 239 | static 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 | ||
248 | static int pcd_block_ioctl(struct block_device *bdev, fmode_t mode, | 247 | static 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 | ||
786 | static int pd_release(struct gendisk *p, fmode_t mode) | 786 | static 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 | ||
798 | static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing) | 796 | static 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); |
212 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); | 212 | static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo); |
213 | 213 | ||
214 | static int pf_release(struct gendisk *disk, fmode_t mode); | 214 | static void pf_release(struct gendisk *disk, fmode_t mode); |
215 | 215 | ||
216 | static int pf_detect(void); | 216 | static int pf_detect(void); |
217 | static void do_pf_read(void); | 217 | static 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 | ||
363 | static int pf_release(struct gendisk *disk, fmode_t mode) | 363 | static 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 | ||
383 | static unsigned int pf_check_events(struct gendisk *disk, unsigned int clearing) | 382 | static 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 | ||
2379 | static int pkt_close(struct gendisk *disk, fmode_t mode) | 2379 | static 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 | ||
463 | static int rbd_release(struct gendisk *disk, fmode_t mode) | 463 | static 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 | ||
480 | static const struct block_device_operations rbd_bd_ops = { | 478 | static 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 | ||
676 | static int floppy_release(struct gendisk *disk, fmode_t mode) | 676 | static 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 | ||
694 | static int floppy_ioctl(struct block_device *bdev, fmode_t mode, | 692 | static 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); | |||
251 | static int floppy_ioctl(struct block_device *bdev, fmode_t mode, | 251 | static int floppy_ioctl(struct block_device *bdev, fmode_t mode, |
252 | unsigned int cmd, unsigned long param); | 252 | unsigned int cmd, unsigned long param); |
253 | static int floppy_open(struct block_device *bdev, fmode_t mode); | 253 | static int floppy_open(struct block_device *bdev, fmode_t mode); |
254 | static int floppy_release(struct gendisk *disk, fmode_t mode); | 254 | static void floppy_release(struct gendisk *disk, fmode_t mode); |
255 | static unsigned int floppy_check_events(struct gendisk *disk, | 255 | static unsigned int floppy_check_events(struct gendisk *disk, |
256 | unsigned int clearing); | 256 | unsigned int clearing); |
257 | static int floppy_revalidate(struct gendisk *disk); | 257 | static 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 | ||
1020 | static int floppy_release(struct gendisk *disk, fmode_t mode) | 1020 | static 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 | ||
1035 | static unsigned int floppy_check_events(struct gendisk *disk, | 1034 | static 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 | ||
1620 | static int blkif_release(struct gendisk *disk, fmode_t mode) | 1620 | static 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) | |||
1658 | out: | 1658 | out: |
1659 | bdput(bdev); | 1659 | bdput(bdev); |
1660 | mutex_unlock(&blkfront_mutex); | 1660 | mutex_unlock(&blkfront_mutex); |
1661 | return 0; | ||
1662 | } | 1661 | } |
1663 | 1662 | ||
1664 | static const struct block_device_operations xlvbd_block_fops = | 1663 | static 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 | ||
918 | static int ace_release(struct gendisk *disk, fmode_t mode) | 918 | static 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 | ||
938 | static int ace_getgeo(struct block_device *bdev, struct hd_geometry *geo) | 937 | static 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 | ||
312 | static int | 312 | static void |
313 | z2_release(struct gendisk *disk, fmode_t mode) | 313 | z2_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 | ||
328 | static const struct block_device_operations z2_fops = | 326 | static const struct block_device_operations z2_fops = |