ext4: remove another test in ext4_alloc_file_blocks()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 3 Dec 2016 21:46:58 +0000 (16:46 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 3 Dec 2016 21:46:58 +0000 (16:46 -0500)
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>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/ext4/extents.c

index 65dbd2b..3e1014f 100644 (file)
@@ -4700,7 +4700,7 @@ retry:
                /*
                 * 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);
                }