On Sun, 2002-07-28 at 21:51, Guido Serassio wrote:
> Hi,
>
> I'm working on awin32 fs module of NT port (an aufs WIN32 port by Robert
> Collins), and l'm found a strange thing in store_io_aufs.c present on aufs too:
>
> In storeAufsCreate(), sio->mode is set to O_WRONLY | O_BINARY, but in
> storeAufsOpenDone() (the only place where i can able to find the usage of
> sio->mode)there is the following code:
>
> if (sio->mode == O_WRONLY)
> storeAufsKickWriteQueue(sio);
> else if (sio->mode == O_RDONLY)
> storeAufsKickReadQueue(sio);
>
> Instead, in storeAufsOpen(), sio->mode is set to O_RDONLY. There are no any
> other places with sio->mode assignment, so, I think that the assignment in
> storeAufsCreate() is wrong.
>
> Any other opinions ?
There is a bug, but not the assignment.
The correct fix is:
if (sio->mode & O_WRONLY)
else if (sio->mode & O_RDONLY).
In storeAufsOpen, the sio->mode should be O_RDONLY | O_BINARY.
Rob
Received on Sun Jul 28 2002 - 06:34:42 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:54 MST