Commit 011c88e3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Theodore Ts'o

ext4: remove another test in ext4_alloc_file_blocks()

Before commit c3fe493c ('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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
parent 9e645ab7
......@@ -4700,7 +4700,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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment