Re: [PATCH v2 2/7] block: rewrite __bio_copy_iov()

From: Christoph Hellwig
Date: Thu Jan 15 2015 - 12:11:04 EST


> +/**
> + * __bio_copy_iov - copy all pages between bio and iov_iter
> + * @bio: The &struct bio which describes the I/O
> + * @iter: iov_iter either as source or destination
> + * @to_iov: whether to %READ (0) or %WRITE (1)
> + *
> + * Simple wrapper around __bio_copy_iov_{write,read}().
> + * Returns 0 on success, or the error returned as-is on failure.
> + */
> +static inline int __bio_copy_iov(struct bio *bio, struct iov_iter iter,
> + int to_iov)
> +{
> + if (to_iov == WRITE)
> + return __bio_copy_iov_write(bio, iter);
> + else
> + return __bio_copy_iov_read(bio, iter);
> }

No need to keep this wrapper..

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