[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
- [PATCH 10/17] ext2fs: set the writing time in the superblock, (continued)
- [PATCH 10/17] ext2fs: set the writing time in the superblock, Etienne Brateau, 2022/01/22
- [PATCH 11/17] ext2fs: resolve a todo, check writability before writing, Etienne Brateau, 2022/01/22
- [PATCH 14/17] ext2fs: refactor add a method for dupplicated code, Etienne Brateau, 2022/01/22
- [PATCH 17/17] ext2fs: remove 2 unused functions, Etienne Brateau, 2022/01/22
- [PATCH 16/17] ext2fs: remove a commented block of code, Etienne Brateau, 2022/01/22
- Re: [PATCH 16/17] ext2fs: remove a commented block of code,
Samuel Thibault <=
- [PATCH 02/17] ext2fs: update ext2_fs.h header, Etienne Brateau, 2022/01/22
- [PATCH 13/17] ext2fs: remove a #define not_yet, Etienne Brateau, 2022/01/22
- [PATCH 12/17] ext2fs: detect and warn when filesystem is an ext3 fs, Etienne Brateau, 2022/01/22
- [PATCH 07/17] ext2fs: use macro to check flags, Etienne Brateau, 2022/01/22