From: Alexander Block Date: Wed, 1 Aug 2012 10:46:05 +0000 (+0200) Subject: Btrfs: fix check for changed extent in is_extent_unchanged X-Git-Tag: accepted/tizen/common/20141203.182822~3484^2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3954096d4b1adab6fbb3c26de37ddd4f781e072f;p=platform%2Fkernel%2Flinux-arm64.git 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 --- 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; }