| To: | linux-xfs@xxxxxxxxxxx |
|---|---|
| Subject: | Fixed xfs_lowbit, try 3 |
| From: | Andi Kleen <ak@xxxxxxxxxxxxx> |
| Date: | 23 Aug 2003 00:20:23 +0200 |
| Date: | Sat, 23 Aug 2003 00:20:23 +0200 |
| Cc: | lord@xxxxxxx |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.1i |
This xfs_lowbit version should work for everybody now including
generic_ffs
(except parisc apparently which has a totally broken ffs)
-Andi
--- linux-2.6.0test3/fs/xfs/xfs_bit.c-o 2003-05-27 03:00:41.000000000 +0200
+++ linux-2.6.0test/fs/xfs/xfs_bit.c 2003-08-23 00:15:38.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;
}
/*
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] One more bugfix for xfs_lowbit64, Andi Kleen |
|---|---|
| Next by Date: | Patch 1300 & rpm issue with 1.3.0, Kai Leibrandt |
| Previous by Thread: | [PATCH] One more bugfix for xfs_lowbit64, Andi Kleen |
| Next by Thread: | Patch 1300 & rpm issue with 1.3.0, Kai Leibrandt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |