Messages in this thread | | | Date | Thu, 15 Jan 2015 09:10:58 -0800 | From | Christoph Hellwig <> | Subject | Re: [PATCH v2 2/7] block: rewrite __bio_copy_iov() |
| |
> +/** > + * __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..
| |