aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:45:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:45:01 -0500
commit275220f0fcff1adf28a717076e00f575edf05fda (patch)
treed249bccc80c64443dab211639050c4fb14332648 /fs/ext4
parentfe3c560b8a22cb28e54fe8950abef38e88d75831 (diff)
parent81c5e2ae33c4b19e53966b427e33646bf6811830 (diff)
Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits) block: ensure that completion error gets properly traced blktrace: add missing probe argument to block_bio_complete block cfq: don't use atomic_t for cfq_group block cfq: don't use atomic_t for cfq_queue block: trace event block fix unassigned field block: add internal hd part table references block: fix accounting bug on cross partition merges kref: add kref_test_and_get bio-integrity: mark kintegrityd_wq highpri and CPU intensive block: make kblockd_workqueue smarter Revert "sd: implement sd_check_events()" block: Clean up exit_io_context() source code. Fix compile warnings due to missing removal of a 'ret' variable fs/block: type signature of major_to_index(int) to major_to_index(unsigned) block: convert !IS_ERR(p) && p to !IS_ERR_NOR_NULL(p) cfq-iosched: don't check cfqg in choose_service_tree() fs/splice: Pull buf->ops->confirm() from splice_from_pipe actors cdrom: export cdrom_check_events() sd: implement sd_check_events() sr: implement sr_check_events() ...
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 29c80f6d8b27..cb10a06775e4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -657,7 +657,7 @@ static struct block_device *ext4_blkdev_get(dev_t dev, struct super_block *sb)
657 struct block_device *bdev; 657 struct block_device *bdev;
658 char b[BDEVNAME_SIZE]; 658 char b[BDEVNAME_SIZE];
659 659
660 bdev = open_by_devnum(dev, FMODE_READ|FMODE_WRITE); 660 bdev = blkdev_get_by_dev(dev, FMODE_READ|FMODE_WRITE|FMODE_EXCL, sb);
661 if (IS_ERR(bdev)) 661 if (IS_ERR(bdev))
662 goto fail; 662 goto fail;
663 return bdev; 663 return bdev;
@@ -673,8 +673,7 @@ fail:
673 */ 673 */
674static int ext4_blkdev_put(struct block_device *bdev) 674static int ext4_blkdev_put(struct block_device *bdev)
675{ 675{
676 bd_release(bdev); 676 return blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL);
677 return blkdev_put(bdev, FMODE_READ|FMODE_WRITE);
678} 677}
679 678
680static int ext4_blkdev_remove(struct ext4_sb_info *sbi) 679static int ext4_blkdev_remove(struct ext4_sb_info *sbi)
@@ -3778,13 +3777,6 @@ static journal_t *ext4_get_dev_journal(struct super_block *sb,
3778 if (bdev == NULL) 3777 if (bdev == NULL)
3779 return NULL; 3778 return NULL;
3780 3779
3781 if (bd_claim(bdev, sb)) {
3782 ext4_msg(sb, KERN_ERR,
3783 "failed to claim external journal device");
3784 blkdev_put(bdev, FMODE_READ|FMODE_WRITE);
3785 return NULL;
3786 }
3787
3788 blocksize = sb->s_blocksize; 3780 blocksize = sb->s_blocksize;
3789 hblock = bdev_logical_block_size(bdev); 3781 hblock = bdev_logical_block_size(bdev);
3790 if (blocksize < hblock) { 3782 if (blocksize < hblock) {