aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2013-07-25 07:22:32 -0400
committerChris Mason <chris.mason@fusionio.com>2013-09-01 08:04:31 -0400
commit09a7f7a28939fe281b6f2fef0fb1a733007d91fe (patch)
tree3407b8f692a74743afdbc4c2f36e6c6eb8acdfad /fs/btrfs/extent_io.c
parent8507d216a41f37ef466b90b5e53cdb741c6e1c17 (diff)
Btrfs: remove unnecessary argument of bio_readpage_error()
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index fe443fece851..5d31f80c0562 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2202,8 +2202,7 @@ out:
2202 */ 2202 */
2203 2203
2204static int bio_readpage_error(struct bio *failed_bio, struct page *page, 2204static int bio_readpage_error(struct bio *failed_bio, struct page *page,
2205 u64 start, u64 end, int failed_mirror, 2205 u64 start, u64 end, int failed_mirror)
2206 struct extent_state *state)
2207{ 2206{
2208 struct io_failure_record *failrec = NULL; 2207 struct io_failure_record *failrec = NULL;
2209 u64 private; 2208 u64 private;
@@ -2212,6 +2211,7 @@ static int bio_readpage_error(struct bio *failed_bio, struct page *page,
2212 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; 2211 struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
2213 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree; 2212 struct extent_io_tree *tree = &BTRFS_I(inode)->io_tree;
2214 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree; 2213 struct extent_map_tree *em_tree = &BTRFS_I(inode)->extent_tree;
2214 struct extent_state *state;
2215 struct bio *bio; 2215 struct bio *bio;
2216 int num_copies; 2216 int num_copies;
2217 int ret; 2217 int ret;
@@ -2296,22 +2296,18 @@ static int bio_readpage_error(struct bio *failed_bio, struct page *page,
2296 * all the retry and error correction code that follows. no 2296 * all the retry and error correction code that follows. no
2297 * matter what the error is, it is very likely to persist. 2297 * matter what the error is, it is very likely to persist.
2298 */ 2298 */
2299 pr_debug("bio_readpage_error: cannot repair, num_copies == 1. " 2299 pr_debug("bio_readpage_error: cannot repair, num_copies=%d, next_mirror %d, failed_mirror %d\n",
2300 "state=%p, num_copies=%d, next_mirror %d, " 2300 num_copies, failrec->this_mirror, failed_mirror);
2301 "failed_mirror %d\n", state, num_copies,
2302 failrec->this_mirror, failed_mirror);
2303 free_io_failure(inode, failrec, 0); 2301 free_io_failure(inode, failrec, 0);
2304 return -EIO; 2302 return -EIO;
2305 } 2303 }
2306 2304
2307 if (!state) { 2305 spin_lock(&tree->lock);
2308 spin_lock(&tree->lock); 2306 state = find_first_extent_bit_state(tree, failrec->start,
2309 state = find_first_extent_bit_state(tree, failrec->start, 2307 EXTENT_LOCKED);
2310 EXTENT_LOCKED); 2308 if (state && state->start != failrec->start)
2311 if (state && state->start != failrec->start) 2309 state = NULL;
2312 state = NULL; 2310 spin_unlock(&tree->lock);
2313 spin_unlock(&tree->lock);
2314 }
2315 2311
2316 /* 2312 /*
2317 * there are two premises: 2313 * there are two premises:
@@ -2541,7 +2537,7 @@ static void end_bio_extent_readpage(struct bio *bio, int err)
2541 * can't handle the error it will return -EIO and we 2537 * can't handle the error it will return -EIO and we
2542 * remain responsible for that page. 2538 * remain responsible for that page.
2543 */ 2539 */
2544 ret = bio_readpage_error(bio, page, start, end, mirror, NULL); 2540 ret = bio_readpage_error(bio, page, start, end, mirror);
2545 if (ret == 0) { 2541 if (ret == 0) {
2546 uptodate = 2542 uptodate =
2547 test_bit(BIO_UPTODATE, &bio->bi_flags); 2543 test_bit(BIO_UPTODATE, &bio->bi_flags);