From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:36787 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbdIQIov (ORCPT ); Sun, 17 Sep 2017 04:44:51 -0400 Received: by mail-pg0-f68.google.com with SMTP id d8so3567101pgt.3 for ; Sun, 17 Sep 2017 01:44:51 -0700 (PDT) Date: Sun, 17 Sep 2017 17:44:55 +0900 Message-ID: <87lgldzpbs.wl-satoru.takeuchi@gmail.com> From: Satoru Takeuchi To: Timofey Titovets Cc: linux-btrfs@vger.kernel.org Subject: Re: [PATCH] Btrfs: cleanup 'start' subtraction from try uncompressed inline extent In-Reply-To: <20170914225726.31218-1-nefelim4ag@gmail.com> References: <20170914225726.31218-1-nefelim4ag@gmail.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-btrfs-owner@vger.kernel.org List-ID: At Fri, 15 Sep 2017 01:57:26 +0300, Timofey Titovets wrote: > > Was added in: > c8b978188c9a0fd3d535c13debd19d522b726f1f > "Btrfs: Add zlib compression support" > Survive to near time (from 08.10.2008). > > Because 'start' checked for zero before branch, so it's > safe to remove that subtraction. > > Signed-off-by: Timofey Titovets Reviewed-by: Satoru Takeuchi > --- > fs/btrfs/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index 02ef32149c15..81123408e82e 100644 > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -570,7 +570,7 @@ static noinline void compress_file_range(struct inode *inode, > cont: > if (start == 0) { > /* lets try to make an inline extent */ > - if (ret || total_in < (actual_end - start)) { > + if (ret || total_in < actual_end) { > /* we didn't compress the entire range, try > * to make an uncompressed inline extent. > */ > -- > 2.14.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html