* ext4: remove another test in ext4_alloc_file_blocks()
@ 2016-10-12 6:00 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2016-10-12 6:00 UTC (permalink / raw)
To: Theodore Ts'o, Fabian Frederick
Cc: Andreas Dilger, linux-ext4, kernel-janitors
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>
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);
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* ext4: remove another test in ext4_alloc_file_blocks()
@ 2016-10-12 6:00 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2016-10-12 6:00 UTC (permalink / raw)
To: Theodore Ts'o, Fabian Frederick
Cc: Andreas Dilger, linux-ext4, kernel-janitors
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>
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);
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: ext4: remove another test in ext4_alloc_file_blocks()
2016-10-12 6:00 ` Dan Carpenter
@ 2016-10-21 9:54 ` Jan Kara
-1 siblings, 0 replies; 6+ messages in thread
From: Jan Kara @ 2016-10-21 9:54 UTC (permalink / raw)
To: Dan Carpenter
Cc: Theodore Ts'o, Fabian Frederick, Andreas Dilger, linux-ext4,
kernel-janitors
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ext4: remove another test in ext4_alloc_file_blocks()
@ 2016-10-21 9:54 ` Jan Kara
0 siblings, 0 replies; 6+ messages in thread
From: Jan Kara @ 2016-10-21 9:54 UTC (permalink / raw)
To: Dan Carpenter
Cc: Theodore Ts'o, Fabian Frederick, Andreas Dilger, linux-ext4,
kernel-janitors
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ext4: remove another test in ext4_alloc_file_blocks()
2016-10-21 9:54 ` Jan Kara
@ 2016-12-03 21:47 ` Theodore Ts'o
-1 siblings, 0 replies; 6+ messages in thread
From: Theodore Ts'o @ 2016-12-03 21:47 UTC (permalink / raw)
To: Jan Kara
Cc: Dan Carpenter, Fabian Frederick, Andreas Dilger, linux-ext4,
kernel-janitors
On Fri, Oct 21, 2016 at 11:54:35AM +0200, Jan Kara wrote:
> 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>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ext4: remove another test in ext4_alloc_file_blocks()
@ 2016-12-03 21:47 ` Theodore Ts'o
0 siblings, 0 replies; 6+ messages in thread
From: Theodore Ts'o @ 2016-12-03 21:47 UTC (permalink / raw)
To: Jan Kara
Cc: Dan Carpenter, Fabian Frederick, Andreas Dilger, linux-ext4,
kernel-janitors
On Fri, Oct 21, 2016 at 11:54:35AM +0200, Jan Kara wrote:
> 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>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-03 21:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-12 6:00 ext4: remove another test in ext4_alloc_file_blocks() Dan Carpenter
2016-10-12 6:00 ` Dan Carpenter
2016-10-21 9:54 ` Jan Kara
2016-10-21 9:54 ` Jan Kara
2016-12-03 21:47 ` Theodore Ts'o
2016-12-03 21:47 ` Theodore Ts'o
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.