aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2012-03-01 08:56:29 -0500
committerDavid Sterba <dsterba@suse.cz>2012-03-21 20:45:32 -0400
commit6763af84a69f23c1c79f00720982e74fcff4d1f3 (patch)
treeca39d3a71fcabd89cce6586abee422edf50e1291 /fs/btrfs/extent_io.c
parent538042801a479ebd316582ad10a9c3156b5b7548 (diff)
btrfs: Remove set bits return from clear_extent_bit
There is only one caller of clear_extent_bit that checks the return value and it only checks if it's negative. Since there are no users of the returned bits functionality of clear_extent_bit, stop returning it and avoid complicating error handling. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 601f23bddea8..a4a7a18cdd3d 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -462,8 +462,7 @@ void extent_io_tree_panic(struct extent_io_tree *tree, int err)
462 * 462 *
463 * the range [start, end] is inclusive. 463 * the range [start, end] is inclusive.
464 * 464 *
465 * This takes the tree lock, and returns < 0 on error, > 0 if any of the 465 * This takes the tree lock, and returns 0 on success and < 0 on error.
466 * bits were already set, or zero if none of the bits were already set.
467 */ 466 */
468int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, 467int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
469 int bits, int wake, int delete, 468 int bits, int wake, int delete,
@@ -477,7 +476,6 @@ int clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
477 struct rb_node *node; 476 struct rb_node *node;
478 u64 last_end; 477 u64 last_end;
479 int err; 478 int err;
480 int set = 0;
481 int clear = 0; 479 int clear = 0;
482 480
483 if (delete) 481 if (delete)
@@ -562,7 +560,7 @@ hit_next:
562 if (err) 560 if (err)
563 goto out; 561 goto out;
564 if (state->end <= end) { 562 if (state->end <= end) {
565 set |= clear_state_bit(tree, state, &bits, wake); 563 clear_state_bit(tree, state, &bits, wake);
566 if (last_end == (u64)-1) 564 if (last_end == (u64)-1)
567 goto out; 565 goto out;
568 start = last_end + 1; 566 start = last_end + 1;
@@ -585,13 +583,13 @@ hit_next:
585 if (wake) 583 if (wake)
586 wake_up(&state->wq); 584 wake_up(&state->wq);
587 585
588 set |= clear_state_bit(tree, prealloc, &bits, wake); 586 clear_state_bit(tree, prealloc, &bits, wake);
589 587
590 prealloc = NULL; 588 prealloc = NULL;
591 goto out; 589 goto out;
592 } 590 }
593 591
594 set |= clear_state_bit(tree, state, &bits, wake); 592 clear_state_bit(tree, state, &bits, wake);
595next: 593next:
596 if (last_end == (u64)-1) 594 if (last_end == (u64)-1)
597 goto out; 595 goto out;
@@ -608,7 +606,7 @@ out:
608 if (prealloc) 606 if (prealloc)
609 free_extent_state(prealloc); 607 free_extent_state(prealloc);
610 608
611 return set; 609 return 0;
612 610
613search_again: 611search_again:
614 if (start > end) 612 if (start > end)