diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-05 21:52:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-07 02:16:21 -0400 |
commit | db2a144bedd58b3dcf19950c2f476c58c9f39d18 (patch) | |
tree | 931f1b5a8e6bafe388b317bce02a9fd9af309d38 /drivers/block/drbd/drbd_main.c | |
parent | a8ca889ed9585894d53fd8919d80cbe8baff09e7 (diff) |
block_device_operations->release() should return void
The value passed is 0 in all but "it can never happen" cases (and those
only in a couple of drivers) *and* it would've been lost on the way
out anyway, even if something tried to pass something meaningful.
Just don't bother.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 5 |
1 files changed, 2 insertions, 3 deletions
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) |