lkml.org 
[lkml]   [2015]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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..



\
 
 \ /
  Last update: 2015-01-15 18:21    [W:0.807 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site