lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTikkAL-ZzxLfa+POoyv4qCE0LUq1h+nfE2_Bn7Ji@mail.gmail.com>
Date:	Thu, 4 Nov 2010 18:44:26 -0400
From:	Greg Freemyer <greg.freemyer@...il.com>
To:	andre@...soft.com.br
Cc:	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] fs: Small refactoring of the code in ext4 2.6.37-rc1

2010/11/4 André Luis Pereira dos Santos - BSRSoft <andre@...soft.com.br>:
> From: Andre Luis Pereira dos Santos <andre@...soft.com.br>
>
> Hi.
> Small refactoring of the code in order to make minor enhancements to critical areas.
> The notation x + 1 has been replaced by more efficient notation x + +.
>
> Signed-off-by: Andre Luis Pereira dos Santos <andre@...soft.com.br>
> ---
> Signed-off-by: Andre Luis Pereira dos Santos <andre@...soft.com.br>
> --- linux-2.6.37-rc1/fs/ext4/extents.c  2010-11-01 09:54:12.000000000 -0200
> +++ linux-2.6.37-rc1-patched/fs/ext4/extents.c  2010-11-04 19:54:26.000000000 -0200
> @@ -555,9 +555,9 @@ ext4_ext_binsearch(struct inode *inode,
>        while (l <= r) {
>                m = l + (r - l) / 2;
>                if (block < le32_to_cpu(m->ee_block))
> -                       r = m - 1;
> +                       r = m--;
>                else
> -                       l = m + 1;
> +                       l = m++;
>                ext_debug("%p(%u):%p(%u):%p(%u) ", l, le32_to_cpu(l->ee_block),
>                                m, le32_to_cpu(m->ee_block),
>                                r, le32_to_cpu(r->ee_block));
> @@ -1557,7 +1557,7 @@ static int ext4_ext_try_to_merge(struct
>                if (ext4_ext_is_uninitialized(ex))
>                        uninitialized = 1;
>                ex->ee_len = cpu_to_le16(ext4_ext_get_actual_len(ex)
> -                               + ext4_ext_get_actual_len(ex + 1));
> +                               + ext4_ext_get_actual_len(ex++));
>                if (uninitialized)
>                        ext4_ext_mark_uninitialized(ex);

But

                   r = m - 1;
is not equivalent to
                   r = m--;

At a minimum your code no longer passes the same value to of m to ext_debug.

NAK

Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ