[OpenAFS-devel] Re: OpenAFS 1.4.7pre1 Oops
Chas Williams (CONTRACTOR)
chas@cmf.nrl.navy.mil
Wed, 02 Apr 2008 13:10:07 -0400
In message <6041d2000804020919h2a5c44c4xda75d95825af2093@mail.gmail.com>,"Marc
Dionne" writes:
>> if (fp->f_flags | O_RDONLY) /* readers dont flush */
>
>Not sure if it has any effect, but this doesn't look right. Perhaps
>the intention was to use &, but that wouldn't work either since
>O_RDONLY happens to be 0.
>
>Typically it would look more like this:
> if ((fp->f_flags & O_ACCMODE) == O_RDONLY)
whoops. that is my brain damage. i told derrick to do that, and i
confuse | and & all the time. even so, O_RDONLY is 0x0, so your
version is certainly correct.