diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-05 22:11:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-07 02:16:31 -0400 |
commit | 4385bab128911df14ab25f0b5ae1a48d7b53dd94 (patch) | |
tree | d8c6f5557f09ebdf294eaba7eba01a140f8da78a /fs/block_dev.c | |
parent | db2a144bedd58b3dcf19950c2f476c58c9f39d18 (diff) |
make blkdev_put() return void
same story as with the previous patches - note that return
value of blkdev_close() is lost, since there's nowhere the
caller (__fput()) could return it to.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index ad2a14174ae0..3823d3ffb760 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1045,7 +1045,7 @@ void bd_set_size(struct block_device *bdev, loff_t size) | |||
1045 | } | 1045 | } |
1046 | EXPORT_SYMBOL(bd_set_size); | 1046 | EXPORT_SYMBOL(bd_set_size); |
1047 | 1047 | ||
1048 | static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part); | 1048 | static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part); |
1049 | 1049 | ||
1050 | /* | 1050 | /* |
1051 | * bd_mutex locking: | 1051 | * bd_mutex locking: |
@@ -1400,9 +1400,8 @@ static int blkdev_open(struct inode * inode, struct file * filp) | |||
1400 | return blkdev_get(bdev, filp->f_mode, filp); | 1400 | return blkdev_get(bdev, filp->f_mode, filp); |
1401 | } | 1401 | } |
1402 | 1402 | ||
1403 | static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part) | 1403 | static void __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part) |
1404 | { | 1404 | { |
1405 | int ret = 0; | ||
1406 | struct gendisk *disk = bdev->bd_disk; | 1405 | struct gendisk *disk = bdev->bd_disk; |
1407 | struct block_device *victim = NULL; | 1406 | struct block_device *victim = NULL; |
1408 | 1407 | ||
@@ -1441,10 +1440,9 @@ static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part) | |||
1441 | bdput(bdev); | 1440 | bdput(bdev); |
1442 | if (victim) | 1441 | if (victim) |
1443 | __blkdev_put(victim, mode, 1); | 1442 | __blkdev_put(victim, mode, 1); |
1444 | return ret; | ||
1445 | } | 1443 | } |
1446 | 1444 | ||
1447 | int blkdev_put(struct block_device *bdev, fmode_t mode) | 1445 | void blkdev_put(struct block_device *bdev, fmode_t mode) |
1448 | { | 1446 | { |
1449 | mutex_lock(&bdev->bd_mutex); | 1447 | mutex_lock(&bdev->bd_mutex); |
1450 | 1448 | ||
@@ -1488,15 +1486,15 @@ int blkdev_put(struct block_device *bdev, fmode_t mode) | |||
1488 | 1486 | ||
1489 | mutex_unlock(&bdev->bd_mutex); | 1487 | mutex_unlock(&bdev->bd_mutex); |
1490 | 1488 | ||
1491 | return __blkdev_put(bdev, mode, 0); | 1489 | __blkdev_put(bdev, mode, 0); |
1492 | } | 1490 | } |
1493 | EXPORT_SYMBOL(blkdev_put); | 1491 | EXPORT_SYMBOL(blkdev_put); |
1494 | 1492 | ||
1495 | static int blkdev_close(struct inode * inode, struct file * filp) | 1493 | static int blkdev_close(struct inode * inode, struct file * filp) |
1496 | { | 1494 | { |
1497 | struct block_device *bdev = I_BDEV(filp->f_mapping->host); | 1495 | struct block_device *bdev = I_BDEV(filp->f_mapping->host); |
1498 | 1496 | blkdev_put(bdev, filp->f_mode); | |
1499 | return blkdev_put(bdev, filp->f_mode); | 1497 | return 0; |
1500 | } | 1498 | } |
1501 | 1499 | ||
1502 | static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg) | 1500 | static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg) |