summaryrefslogtreecommitdiff
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-05 21:52:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-07 02:16:21 -0400
commitdb2a144bedd58b3dcf19950c2f476c58c9f39d18 (patch)
tree931f1b5a8e6bafe388b317bce02a9fd9af309d38 /drivers/block/rbd.c
parenta8ca889ed9585894d53fd8919d80cbe8baff09e7 (diff)
downloadlwn-db2a144bedd58b3dcf19950c2f476c58c9f39d18.tar.gz
lwn-db2a144bedd58b3dcf19950c2f476c58c9f39d18.zip
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/rbd.c')
-rw-r--r--drivers/block/rbd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index b7b7a88d9f68..04ca496485b0 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -411,7 +411,7 @@ static int rbd_open(struct block_device *bdev, fmode_t mode)
return 0;
}
-static int rbd_release(struct gendisk *disk, fmode_t mode)
+static void rbd_release(struct gendisk *disk, fmode_t mode)
{
struct rbd_device *rbd_dev = disk->private_data;
unsigned long open_count_before;
@@ -424,8 +424,6 @@ static int rbd_release(struct gendisk *disk, fmode_t mode)
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
put_device(&rbd_dev->dev);
mutex_unlock(&ctl_mutex);
-
- return 0;
}
static const struct block_device_operations rbd_bd_ops = {