bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 16/17] ext2fs: remove a commented block of code


From: Samuel Thibault
Subject: Re: [PATCH 16/17] ext2fs: remove a commented block of code
Date: Sun, 23 Jan 2022 10:47:32 +0100
User-agent: NeoMutt/20170609 (1.8.3)

We need to record why it's actually not needed in the git log.

Etienne Brateau, le dim. 23 janv. 2022 05:17:14 +0100, a ecrit:
> ---
>  ext2fs/ialloc.c | 34 ++++++++--------------------------
>  1 file changed, 8 insertions(+), 26 deletions(-)
> 
> diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c
> index 73778bee..568d7eae 100644
> --- a/ext2fs/ialloc.c
> +++ b/ext2fs/ialloc.c
> @@ -133,36 +133,18 @@ repeat:
>      {
>        avefreei = le32toh (sblock->s_free_inodes_count) / groups_count;
>  
> -/* I am not yet convinced that this next bit is necessary.
> -      i = inode_group_num(dir_inum);
>        for (j = 0; j < groups_count; j++)
>          {
> -          tmp = group_desc (i);
> -          if ((tmp->bg_used_dirs_count << 8) < tmp->bg_free_inodes_count)
> +          tmp = group_desc (j);
> +          if (le16toh (tmp->bg_free_inodes_count)
> +              && le16toh (tmp->bg_free_inodes_count) >= avefreei)
>              {
> -              gdp = tmp;
> -              break;
> -            }
> -          else
> -            i = ++i % groups_count;
> -        }
> - */
> -
> -      if (!gdp)
> -        {
> -          for (j = 0; j < groups_count; j++)
> -            {
> -              tmp = group_desc (j);
> -              if (le16toh (tmp->bg_free_inodes_count)
> -                  && le16toh (tmp->bg_free_inodes_count) >= avefreei)
> +              if (!gdp ||
> +                  (le16toh (tmp->bg_free_blocks_count) >
> +                   le16toh (gdp->bg_free_blocks_count)))
>                  {
> -                  if (!gdp ||
> -                      (le16toh (tmp->bg_free_blocks_count) >
> -                       le16toh (gdp->bg_free_blocks_count)))
> -                  {
> -                    i = j;
> -                    gdp = tmp;
> -                  }
> +                  i = j;
> +                  gdp = tmp;
>                  }
>              }
>          }
> -- 
> 2.34.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]