Samuel Thibault <samuel.thiba...@gnu.org> writes:

> dev_read starts with if (err) return err;. Various functions do not
> define their own err variable. I don't know the original reason for
> this, but this looks fishy to me, and local variables should probably
> always be used, patch welcome.

I wondered about that: access to the underlying device is serialized
(‘trivfs_S_io_read’ & co. start by acquiring ‘global_lock’), and there’s
this global ‘err’ variable, and I thought the intent may be to memorize
what error occurred previously and avoid initiating a new device
operation until it is cleared.

So at least this seems to be internally consistent, no?

Ludo’.

Reply via email to