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/md | |
parent | 511de73ff09034fb89c8d54bed201a10d057328c (diff) |
[PATCH] pass fmode_t to blkdev_put()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-table.c | 4 | ||||
-rw-r--r-- | drivers/md/md.c | 4 |
2 files changed, 4 insertions, 4 deletions
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); |