linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Theodore Ts'o <tytso@mit.edu>, Fabian Frederick <fabf@skynet.be>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: ext4: remove another test in ext4_alloc_file_blocks()
Date: Fri, 21 Oct 2016 11:54:35 +0200	[thread overview]
Message-ID: <20161021095435.GC8271@quack2.suse.cz> (raw)
In-Reply-To: <20161012060002.GA12778@mwanda>

On Wed 12-10-16 09:00:02, Dan Carpenter wrote:
> Before commit c3fe493ccdb1 ('ext4: remove unneeded test in
> ext4_alloc_file_blocks()') then it was possible for "depth" to be -1
> but now, it's not possible that it is negative.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index c930a01..dca394c 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4701,7 +4701,7 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
>  		/*
>  		 * Recalculate credits when extent tree depth changes.
>  		 */
> -		if (depth >= 0 && depth != ext_depth(inode)) {
> +		if (depth != ext_depth(inode)) {
>  			credits = ext4_chunk_trans_blocks(inode, len);
>  			depth = ext_depth(inode);
>  		}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2016-10-21  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  6:00 ext4: remove another test in ext4_alloc_file_blocks() Dan Carpenter
2016-10-21  9:54 ` Jan Kara [this message]
2016-12-03 21:47   ` Theodore Ts'o

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=20161021095435.GC8271@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=dan.carpenter@oracle.com \
    --cc=fabf@skynet.be \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).