diff options
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r-- | fs/ext3/super.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index b7d0554631e4..7aa767d4f06f 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -364,7 +364,7 @@ static struct block_device *ext3_blkdev_get(dev_t dev, struct super_block *sb) | |||
364 | struct block_device *bdev; | 364 | struct block_device *bdev; |
365 | char b[BDEVNAME_SIZE]; | 365 | char b[BDEVNAME_SIZE]; |
366 | 366 | ||
367 | bdev = open_by_devnum(dev, FMODE_READ|FMODE_WRITE); | 367 | bdev = blkdev_get_by_dev(dev, FMODE_READ|FMODE_WRITE|FMODE_EXCL, sb); |
368 | if (IS_ERR(bdev)) | 368 | if (IS_ERR(bdev)) |
369 | goto fail; | 369 | goto fail; |
370 | return bdev; | 370 | return bdev; |
@@ -381,8 +381,7 @@ fail: | |||
381 | */ | 381 | */ |
382 | static int ext3_blkdev_put(struct block_device *bdev) | 382 | static int ext3_blkdev_put(struct block_device *bdev) |
383 | { | 383 | { |
384 | bd_release(bdev); | 384 | return blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); |
385 | return blkdev_put(bdev, FMODE_READ|FMODE_WRITE); | ||
386 | } | 385 | } |
387 | 386 | ||
388 | static int ext3_blkdev_remove(struct ext3_sb_info *sbi) | 387 | static int ext3_blkdev_remove(struct ext3_sb_info *sbi) |
@@ -2162,13 +2161,6 @@ static journal_t *ext3_get_dev_journal(struct super_block *sb, | |||
2162 | if (bdev == NULL) | 2161 | if (bdev == NULL) |
2163 | return NULL; | 2162 | return NULL; |
2164 | 2163 | ||
2165 | if (bd_claim(bdev, sb)) { | ||
2166 | ext3_msg(sb, KERN_ERR, | ||
2167 | "error: failed to claim external journal device"); | ||
2168 | blkdev_put(bdev, FMODE_READ|FMODE_WRITE); | ||
2169 | return NULL; | ||
2170 | } | ||
2171 | |||
2172 | blocksize = sb->s_blocksize; | 2164 | blocksize = sb->s_blocksize; |
2173 | hblock = bdev_logical_block_size(bdev); | 2165 | hblock = bdev_logical_block_size(bdev); |
2174 | if (blocksize < hblock) { | 2166 | if (blocksize < hblock) { |