xfs-masters
[Top] [All Lists]

[xfs-masters] Re: ffs()

To: Linus Torvalds <torvalds@xxxxxxxx>
Subject: [xfs-masters] Re: ffs()
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Thu, 3 Jun 2004 17:23:51 -0700
Cc: akpm@xxxxxxxx, xfs-masters@xxxxxxxxxxx, nathans@xxxxxxx
In-reply-to: <Pine.LNX.4.58.0406031517340.3403@ppc970.osdl.org>
References: <20040603143710.326e56ca.davem@redhat.com> <Pine.LNX.4.58.0406031504031.3403@ppc970.osdl.org> <20040603151009.6edd1c0b.davem@redhat.com> <Pine.LNX.4.58.0406031517340.3403@ppc970.osdl.org>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
On Thu, 3 Jun 2004 15:22:51 -0700 (PDT)
Linus Torvalds <torvalds@xxxxxxxx> wrote:

> On Thu, 3 Jun 2004, David S. Miller wrote:
> > 
> > [ Nathan, the issue is that XFS calls ffs() potentially with an arg
> >   value of zero which is illegal and has undefined behavior, the
> >   XFS code is depending upon ffs() returning -1 in this case. ]
> 
> Hmm. It can't depend on -1, since at least on x86, it returns zero. 
> 
> Do you mean "depend on 0"?

Duh you're right, I saw that "-1" in the x86 asm and that
confused me :-)

<Prev in Thread] Current Thread [Next in Thread>