ext4: remove another test in ext4_alloc_file_blocks()
Subsystems (2)
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.
fs/ext4/extents.c +1 -1
@@ -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); }
Quoted 5 lines · Dan Carpenter
Before commit
c3fe493ccdb1('ext4: remove unneeded test inext4_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 <[email protected]>
Looks good. You can add:
Honza
Quoted 18 lines
fs/ext4/extents.c +1
-2@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
Quoted 10 lines · Jan Kara
Quoted 5 lines · Dan Carpenter
Before commit
c3fe493ccdb1('ext4: remove unneeded test inext4_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 <[email protected]>Looks good. You can add:
Reviewed-by Jan Kara <[email protected]>
Applied, thanks.
- Ted