tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Cleanup bread/breadn API



On Sun, Dec 09, 2012 at 10:15:19AM +0100, J. Hannken-Illjes wrote:
> The functions bread() and breadn() have an ambiguous API.  They return
> a buffer on error except when called from the pagedaemon.  This lead
> to ugly code in some file systems where bread() had to be expanded
> for operations that get called from the pagedaemon.  See PR kern/46282.
> 
> The attached diff changes bread() and breadn() to not return a buffer
> in case of error.  Changing ~160 calls of bread() to not brelse() on
> error is not included in the diff.
> 
> Comments or objections?

looks good to me.

-Chuck


Home | Main Index | Thread Index | Old Index