use less confusing names for iov_iter direction initializers
READ/WRITE proved to be actively confusing - the meanings are "data destination, as used with read(2)" and "data source, as used with write(2)", but people keep interpreting those as "we read data from it" and "we write data to it", i.e. exactly the wrong way. Call them ITER_DEST and ITER_SOURCE - at least that is harder to misinterpret... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -376,7 +376,7 @@ void swap_write_unplug(struct swap_iocb *sio)
|
||||
struct address_space *mapping = sio->iocb.ki_filp->f_mapping;
|
||||
int ret;
|
||||
|
||||
iov_iter_bvec(&from, WRITE, sio->bvec, sio->pages, sio->len);
|
||||
iov_iter_bvec(&from, ITER_SOURCE, sio->bvec, sio->pages, sio->len);
|
||||
ret = mapping->a_ops->swap_rw(&sio->iocb, &from);
|
||||
if (ret != -EIOCBQUEUED)
|
||||
sio_write_complete(&sio->iocb, ret);
|
||||
@@ -530,7 +530,7 @@ void __swap_read_unplug(struct swap_iocb *sio)
|
||||
struct address_space *mapping = sio->iocb.ki_filp->f_mapping;
|
||||
int ret;
|
||||
|
||||
iov_iter_bvec(&from, READ, sio->bvec, sio->pages, sio->len);
|
||||
iov_iter_bvec(&from, ITER_DEST, sio->bvec, sio->pages, sio->len);
|
||||
ret = mapping->a_ops->swap_rw(&sio->iocb, &from);
|
||||
if (ret != -EIOCBQUEUED)
|
||||
sio_read_complete(&sio->iocb, ret);
|
||||
|
||||
Reference in New Issue
Block a user