summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorAlexander Block <ablock84@googlemail.com>2012-08-01 12:46:05 +0200
committerChris Mason <chris.mason@fusionio.com>2012-10-01 15:18:57 -0400
commit3954096d4b1adab6fbb3c26de37ddd4f781e072f (patch)
tree5f57d6c5acabc8135210278b818052e7104b94b9 /fs/btrfs/send.c
parent5dc67d0ba915cda01ed3a980502945edf2c46b70 (diff)
downloadop-kernel-dev-3954096d4b1adab6fbb3c26de37ddd4f781e072f.zip
op-kernel-dev-3954096d4b1adab6fbb3c26de37ddd4f781e072f.tar.gz
Btrfs: fix check for changed extent in is_extent_unchanged
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>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index cfbe987..35222d5 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -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;
}
OpenPOWER on IntegriCloud