| To: | Andi Kleen <ak@xxxxxx> |
|---|---|
| Subject: | Re: [PATCH] One more bugfix for xfs_lowbit64 |
| From: | Steve Lord <lord@xxxxxxx> |
| Date: | 22 Aug 2003 16:09:53 -0500 |
| Cc: | linux-xfs@xxxxxxxxxxx |
| In-reply-to: | <20030822201012.GA19026@averell> |
| Organization: | |
| References: | <20030822201012.GA19026@averell> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
On Fri, 2003-08-22 at 15:10, Andi Kleen wrote:
> (mea culpa). The error return was broken too, it would return -2,
> not -1 for errors. Makes no difference in the callers, they never check
> for -1, but is still better to conform to the spec.
>
> Includes the previous fix for bits > 32.
>
> -Andi
>
> --- linux-2.6.0test3/fs/xfs/xfs_bit.c-o 2003-05-27 03:00:41.000000000
> +0200
> +++ linux-2.6.0test3/fs/xfs/xfs_bit.c 2003-08-22 22:08:14.000000000 +0200
> @@ -156,12 +156,12 @@
> {
> int n;
> n = ffs((unsigned)v);
> - if (n == 0) {
> + if (n < 0) {
> n = ffs(v >> 32);
> if (n >= 0)
> n+=32;
> }
> - return n-1;
> + return (n < 0) ? n : n-1;
> }
>
> /*
You know, on second thoughts, are you sure about that? generic_ffs
and man ffs seem to suggest otherwise.
Steve
--
Steve Lord voice: +1-651-683-3511
Principal Engineer, Filesystem Software email: lord@xxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] One more bugfix for xfs_lowbit64, Steve Lord |
|---|---|
| Next by Date: | Re: [PATCH] One more bugfix for xfs_lowbit64, Andi Kleen |
| Previous by Thread: | Re: [PATCH] One more bugfix for xfs_lowbit64, Andi Kleen |
| Next by Thread: | Re: [PATCH] One more bugfix for xfs_lowbit64, Andi Kleen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |