linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Satoru Takeuchi <satoru.takeuchi@gmail.com>
To: Timofey Titovets <nefelim4ag@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: cleanup 'start' subtraction from try uncompressed inline extent
Date: Sun, 17 Sep 2017 17:44:55 +0900	[thread overview]
Message-ID: <87lgldzpbs.wl-satoru.takeuchi@gmail.com> (raw)
In-Reply-To: <20170914225726.31218-1-nefelim4ag@gmail.com>

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 <nefelim4ag@gmail.com>

Reviewed-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>

> ---
>  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

      reply	other threads:[~2017-09-17  8:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-14 22:57 [PATCH] Btrfs: cleanup 'start' subtraction from try uncompressed inline extent Timofey Titovets
2017-09-17  8:44 ` Satoru Takeuchi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lgldzpbs.wl-satoru.takeuchi@gmail.com \
    --to=satoru.takeuchi@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nefelim4ag@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).