direntlen is always >= 8. Therefore, the loop condition is always true. Signed-off-by: Michael Walle <mich...@walle.cc> Suggested-by: Stefan BrĂ¼ns <stefan.bru...@rwth-aachen.de> --- fs/ext4/ext4_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 4a003cf..9430a3b 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -420,7 +420,7 @@ restart: goto fail; dir = (struct ext2_dirent *)root_first_block_buffer; totalbytes = 0; - while (le16_to_cpu(dir->direntlen) > 0) { + while (true) { /* * blocksize-totalbytes because last directory length * i.e. dir->direntlen is free availble space in the @@ -560,7 +560,7 @@ static int search_dir(struct ext2_inode *parent_inode, char *dirname) dir = (struct ext2_dirent *)block_buffer; ptr = (char *)dir; totalbytes = 0; - while (le16_to_cpu(dir->direntlen) >= 0) { + while (true) { /* * blocksize-totalbytes because last directory * length i.e.,*dir->direntlen is free availble @@ -806,7 +806,7 @@ static int check_filename(char *filename, unsigned int blknr) dir = (struct ext2_dirent *)root_first_block_buffer; ptr = (char *)dir; totalbytes = 0; - while (le16_to_cpu(dir->direntlen) >= 0) { + while (true) { /* * blocksize-totalbytes because last * directory length i.e., *dir->direntlen -- 2.1.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot