[PATCH 21/25] xfs: add buffer pre-write callback

Christoph Hellwig hch at infradead.org
Fri Oct 26 03:50:14 CDT 2012


>  	/*
> +	 * run the pre-io callback function if it exists. If this function
> +	 * fails it will mark the buffer with an error and the IO should
> +	 * not be dispatched.
> +	 */
> +	if (bp->b_pre_io) {
> +		bp->b_pre_io(bp);
> +		if (bp->b_error) {

Wouldn't it be a cleaner calling convention to return the erro from the
callback?



More information about the xfs mailing list