Re: 2.6.5-mc2

From: Andrew Morton
Date: Wed Apr 07 2004 - 13:27:31 EST


William Lee Irwin III <wli@xxxxxxxxxxxxxx> wrote:
>
> On Wed, Apr 07, 2004 at 11:04:30AM -0700, William Lee Irwin III wrote:
> > + if (sizeof(unsigned long) == 8)
>
> Ugh.

I did it this way, relying on magical promotions:

--- 25/fs/open.c~nfs-32bit-statfs-fix-warning-fix 2004-04-06 23:16:25.221685072 -0700
+++ 25-akpm/fs/open.c 2004-04-06 23:16:25.225684464 -0700
@@ -64,10 +64,10 @@ static int vfs_statfs_native(struct supe
* f_files and f_ffree may be -1; it's okay to stuff
* that into 32 bits
*/
- if (st.f_files != 0xffffffffffffffffULL &&
+ if (st.f_files != -1 &&
(st.f_files & 0xffffffff00000000ULL))
return -EOVERFLOW;
- if (st.f_ffree != 0xffffffffffffffffULL &&
+ if (st.f_ffree != -1 &&
(st.f_ffree & 0xffffffff00000000ULL))
return -EOVERFLOW;
}

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/