diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-02-22 20:40:24 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:58 -0400 |
commit | 9a1c3542768b5a58e45a9216921cd10a3bae1205 (patch) | |
tree | c20ffda950db868ec7e1e35aed532962de2ecfd9 /drivers | |
parent | 511de73ff09034fb89c8d54bed201a10d057328c (diff) |
[PATCH] pass fmode_t to blkdev_put()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/pktcdvd.c | 8 | ||||
-rw-r--r-- | drivers/char/raw.c | 4 | ||||
-rw-r--r-- | drivers/md/dm-table.c | 4 | ||||
-rw-r--r-- | drivers/md/md.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_genhd.c | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 90548da9c1cb..ce8c71901923 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -2381,7 +2381,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write) | |||
2381 | out_unclaim: | 2381 | out_unclaim: |
2382 | bd_release(pd->bdev); | 2382 | bd_release(pd->bdev); |
2383 | out_putdev: | 2383 | out_putdev: |
2384 | blkdev_put(pd->bdev); | 2384 | blkdev_put(pd->bdev, FMODE_READ); |
2385 | out: | 2385 | out: |
2386 | return ret; | 2386 | return ret; |
2387 | } | 2387 | } |
@@ -2399,7 +2399,7 @@ static void pkt_release_dev(struct pktcdvd_device *pd, int flush) | |||
2399 | 2399 | ||
2400 | pkt_set_speed(pd, MAX_SPEED, MAX_SPEED); | 2400 | pkt_set_speed(pd, MAX_SPEED, MAX_SPEED); |
2401 | bd_release(pd->bdev); | 2401 | bd_release(pd->bdev); |
2402 | blkdev_put(pd->bdev); | 2402 | blkdev_put(pd->bdev, FMODE_READ); |
2403 | 2403 | ||
2404 | pkt_shrink_pktlist(pd); | 2404 | pkt_shrink_pktlist(pd); |
2405 | } | 2405 | } |
@@ -2790,7 +2790,7 @@ static int pkt_new_dev(struct pktcdvd_device *pd, dev_t dev) | |||
2790 | return 0; | 2790 | return 0; |
2791 | 2791 | ||
2792 | out_mem: | 2792 | out_mem: |
2793 | blkdev_put(bdev); | 2793 | blkdev_put(bdev, FMODE_READ|FMODE_WRITE); |
2794 | /* This is safe: open() is still holding a reference. */ | 2794 | /* This is safe: open() is still holding a reference. */ |
2795 | module_put(THIS_MODULE); | 2795 | module_put(THIS_MODULE); |
2796 | return ret; | 2796 | return ret; |
@@ -2975,7 +2975,7 @@ static int pkt_remove_dev(dev_t pkt_dev) | |||
2975 | pkt_debugfs_dev_remove(pd); | 2975 | pkt_debugfs_dev_remove(pd); |
2976 | pkt_sysfs_dev_remove(pd); | 2976 | pkt_sysfs_dev_remove(pd); |
2977 | 2977 | ||
2978 | blkdev_put(pd->bdev); | 2978 | blkdev_put(pd->bdev, FMODE_READ|FMODE_WRITE); |
2979 | 2979 | ||
2980 | remove_proc_entry(pd->name, pkt_proc); | 2980 | remove_proc_entry(pd->name, pkt_proc); |
2981 | DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name); | 2981 | DPRINTK(DRIVER_NAME": writer %s unmapped\n", pd->name); |
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index e139372d0e69..bfd59e6bf54f 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -87,7 +87,7 @@ static int raw_open(struct inode *inode, struct file *filp) | |||
87 | out2: | 87 | out2: |
88 | bd_release(bdev); | 88 | bd_release(bdev); |
89 | out1: | 89 | out1: |
90 | blkdev_put(bdev); | 90 | blkdev_put(bdev, filp->f_mode); |
91 | out: | 91 | out: |
92 | mutex_unlock(&raw_mutex); | 92 | mutex_unlock(&raw_mutex); |
93 | return err; | 93 | return err; |
@@ -112,7 +112,7 @@ static int raw_release(struct inode *inode, struct file *filp) | |||
112 | mutex_unlock(&raw_mutex); | 112 | mutex_unlock(&raw_mutex); |
113 | 113 | ||
114 | bd_release(bdev); | 114 | bd_release(bdev); |
115 | blkdev_put(bdev); | 115 | blkdev_put(bdev, filp->f_mode); |
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 7c8671b06fe3..dd8bd2e867cd 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -357,7 +357,7 @@ static int open_dev(struct dm_dev_internal *d, dev_t dev, | |||
357 | return PTR_ERR(bdev); | 357 | return PTR_ERR(bdev); |
358 | r = bd_claim_by_disk(bdev, _claim_ptr, dm_disk(md)); | 358 | r = bd_claim_by_disk(bdev, _claim_ptr, dm_disk(md)); |
359 | if (r) | 359 | if (r) |
360 | blkdev_put(bdev); | 360 | blkdev_put(bdev, d->dm_dev.mode); |
361 | else | 361 | else |
362 | d->dm_dev.bdev = bdev; | 362 | d->dm_dev.bdev = bdev; |
363 | return r; | 363 | return r; |
@@ -372,7 +372,7 @@ static void close_dev(struct dm_dev_internal *d, struct mapped_device *md) | |||
372 | return; | 372 | return; |
373 | 373 | ||
374 | bd_release_from_disk(d->dm_dev.bdev, dm_disk(md)); | 374 | bd_release_from_disk(d->dm_dev.bdev, dm_disk(md)); |
375 | blkdev_put(d->dm_dev.bdev); | 375 | blkdev_put(d->dm_dev.bdev, d->dm_dev.mode); |
376 | d->dm_dev.bdev = NULL; | 376 | d->dm_dev.bdev = NULL; |
377 | } | 377 | } |
378 | 378 | ||
diff --git a/drivers/md/md.c b/drivers/md/md.c index 06ea991c7a40..c1a837ca193c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1520,7 +1520,7 @@ static int lock_rdev(mdk_rdev_t *rdev, dev_t dev, int shared) | |||
1520 | if (err) { | 1520 | if (err) { |
1521 | printk(KERN_ERR "md: could not bd_claim %s.\n", | 1521 | printk(KERN_ERR "md: could not bd_claim %s.\n", |
1522 | bdevname(bdev, b)); | 1522 | bdevname(bdev, b)); |
1523 | blkdev_put(bdev); | 1523 | blkdev_put(bdev, FMODE_READ|FMODE_WRITE); |
1524 | return err; | 1524 | return err; |
1525 | } | 1525 | } |
1526 | if (!shared) | 1526 | if (!shared) |
@@ -1536,7 +1536,7 @@ static void unlock_rdev(mdk_rdev_t *rdev) | |||
1536 | if (!bdev) | 1536 | if (!bdev) |
1537 | MD_BUG(); | 1537 | MD_BUG(); |
1538 | bd_release(bdev); | 1538 | bd_release(bdev); |
1539 | blkdev_put(bdev); | 1539 | blkdev_put(bdev, FMODE_READ|FMODE_WRITE); |
1540 | } | 1540 | } |
1541 | 1541 | ||
1542 | void md_autodetect_dev(dev_t dev); | 1542 | void md_autodetect_dev(dev_t dev); |
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index aee6565aaf98..3c1b6915c9ad 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -152,7 +152,7 @@ void dasd_destroy_partitions(struct dasd_block *block) | |||
152 | 152 | ||
153 | invalidate_partition(block->gdp, 0); | 153 | invalidate_partition(block->gdp, 0); |
154 | /* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */ | 154 | /* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */ |
155 | blkdev_put(bdev); | 155 | blkdev_put(bdev, FMODE_READ); |
156 | set_capacity(block->gdp, 0); | 156 | set_capacity(block->gdp, 0); |
157 | } | 157 | } |
158 | 158 | ||