aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-05 22:11:03 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-07 02:16:31 -0400
commit4385bab128911df14ab25f0b5ae1a48d7b53dd94 (patch)
treed8c6f5557f09ebdf294eaba7eba01a140f8da78a /fs/block_dev.c
parentdb2a144bedd58b3dcf19950c2f476c58c9f39d18 (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.c14
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}
1046EXPORT_SYMBOL(bd_set_size); 1046EXPORT_SYMBOL(bd_set_size);
1047 1047
1048static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part); 1048static 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
1403static int __blkdev_put(struct block_device *bdev, fmode_t mode, int for_part) 1403static 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
1447int blkdev_put(struct block_device *bdev, fmode_t mode) 1445void 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}
1493EXPORT_SYMBOL(blkdev_put); 1491EXPORT_SYMBOL(blkdev_put);
1494 1492
1495static int blkdev_close(struct inode * inode, struct file * filp) 1493static 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
1502static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg) 1500static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)