Re: [PATCH linux-2.6.1-rc1-mm1] aiodio_fallback_bio_count.patch

From: Lincoln Dale
Date: Mon Jan 05 2004 - 01:16:02 EST


At 04:28 PM 5/01/2004, Andrew Morton wrote:
> None. The '>' situation should never occur.
>
> This is just being explicit about covering the "not less than" case
> as a whole, and making sure we do not fall through to buffered i/o in
> that case, i.e its the same as:
> if (!(written < count) && !is_sync_kiocb(iocb))
>
> Is that any less confusing ? Or would you rather just replace the '>=" by
> "=='.

Well the original confused the heck out of me! yes, `if (written == count)'
should be fine: it says exactly what we want it to say.

perhaps the original was defensive programming against a single-bit-error hitting 'written' .... :-)


cheers,

lincoln.
PS. just kidding

-
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/