Skip to content

Commit e7388b8

Browse files
dhowellssmfrench
authored andcommitted
cifs: DIO to/from KVEC-type iterators should now work
DIO to/from KVEC-type iterators should now work as the iterator is passed down to the socket in non-RDMA/non-crypto mode and in RDMA or crypto mode care is taken to handle vmap/vmalloc correctly and not take page refs when building a scatterlist. Signed-off-by: David Howells <[email protected]> cc: Steve French <[email protected]> cc: Shyam Prasad N <[email protected]> cc: Rohith Surabattula <[email protected]> cc: Tom Talpey <[email protected]> cc: Jeff Layton <[email protected]> cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent 607aea3 commit e7388b8

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

fs/cifs/file.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3549,16 +3549,6 @@ static ssize_t __cifs_writev(
35493549
struct cifs_aio_ctx *ctx;
35503550
int rc;
35513551

3552-
/*
3553-
* iov_iter_get_pages_alloc doesn't work with ITER_KVEC.
3554-
* In this case, fall back to non-direct write function.
3555-
* this could be improved by getting pages directly in ITER_KVEC
3556-
*/
3557-
if (direct && iov_iter_is_kvec(from)) {
3558-
cifs_dbg(FYI, "use non-direct cifs_writev for kvec I/O\n");
3559-
direct = false;
3560-
}
3561-
35623552
rc = generic_write_checks(iocb, from);
35633553
if (rc <= 0)
35643554
return rc;
@@ -4092,16 +4082,6 @@ static ssize_t __cifs_readv(
40924082
loff_t offset = iocb->ki_pos;
40934083
struct cifs_aio_ctx *ctx;
40944084

4095-
/*
4096-
* iov_iter_get_pages_alloc() doesn't work with ITER_KVEC,
4097-
* fall back to data copy read path
4098-
* this could be improved by getting pages directly in ITER_KVEC
4099-
*/
4100-
if (direct && iov_iter_is_kvec(to)) {
4101-
cifs_dbg(FYI, "use non-direct cifs_user_readv for kvec I/O\n");
4102-
direct = false;
4103-
}
4104-
41054085
len = iov_iter_count(to);
41064086
if (!len)
41074087
return 0;

0 commit comments

Comments
 (0)