Skip to content

Commit

Permalink
Btrfs: fix check for changed extent in is_extent_unchanged
Browse files Browse the repository at this point in the history
The previous check was working fine, but this check should be
easier to read. Also, we could theoritically have some exotic
bugs with the previous checks.

Signed-off-by: Alexander Block <ablock84@googlemail.com>
  • Loading branch information
Alexander Block authored and Chris Mason committed Oct 1, 2012
1 parent 5dc67d0 commit 3954096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -3819,8 +3819,8 @@ static int is_extent_unchanged(struct send_ctx *sctx,
/*
* Check if we have the same extent.
*/
if (left_disknr + left_offset_fixed !=
right_disknr + right_offset) {
if (left_disknr != right_disknr ||
left_offset_fixed != right_offset) {
ret = 0;
goto out;
}
Expand Down

0 comments on commit 3954096

Please sign in to comment.