diff options
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index f430cc6e0f35..e823a27ba340 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -684,6 +684,9 @@ static int ocfs2_validate_extent_block(struct super_block *sb, | |||
684 | struct ocfs2_extent_block *eb = | 684 | struct ocfs2_extent_block *eb = |
685 | (struct ocfs2_extent_block *)bh->b_data; | 685 | (struct ocfs2_extent_block *)bh->b_data; |
686 | 686 | ||
687 | mlog(0, "Validating extent block %llu\n", | ||
688 | (unsigned long long)bh->b_blocknr); | ||
689 | |||
687 | if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) { | 690 | if (!OCFS2_IS_VALID_EXTENT_BLOCK(eb)) { |
688 | ocfs2_error(sb, | 691 | ocfs2_error(sb, |
689 | "Extent block #%llu has bad signature %.*s", | 692 | "Extent block #%llu has bad signature %.*s", |
@@ -719,21 +722,13 @@ int ocfs2_read_extent_block(struct inode *inode, u64 eb_blkno, | |||
719 | int rc; | 722 | int rc; |
720 | struct buffer_head *tmp = *bh; | 723 | struct buffer_head *tmp = *bh; |
721 | 724 | ||
722 | rc = ocfs2_read_block(inode, eb_blkno, &tmp); | 725 | rc = ocfs2_read_block(inode, eb_blkno, &tmp, |
723 | if (rc) | 726 | ocfs2_validate_extent_block); |
724 | goto out; | ||
725 | |||
726 | rc = ocfs2_validate_extent_block(inode->i_sb, tmp); | ||
727 | if (rc) { | ||
728 | brelse(tmp); | ||
729 | goto out; | ||
730 | } | ||
731 | 727 | ||
732 | /* If ocfs2_read_block() got us a new bh, pass it up. */ | 728 | /* If ocfs2_read_block() got us a new bh, pass it up. */ |
733 | if (!*bh) | 729 | if (!rc && !*bh) |
734 | *bh = tmp; | 730 | *bh = tmp; |
735 | 731 | ||
736 | out: | ||
737 | return rc; | 732 | return rc; |
738 | } | 733 | } |
739 | 734 | ||