scst, iscsi-scst: Port to RHEL / CentOS 8.2

Apparently the Linux kernel v4.20 iov_iter_kvec() function has been
backported to RHEL / CentOS 8.2. This patch fixes the following kernel
warning:

WARNING: CPU: 26 PID: 21141 at lib/iov_iter.c:1083 iov_iter_kvec+0x25/0x30
Call Trace:
 fileio_exec_async+0x216/0x3a0 [scst_vdisk]
 fileio_exec_write+0x3b9/0x450 [scst_vdisk]
 vdev_do_job+0x34/0xc0 [scst_vdisk]
 scst_do_real_exec+0x54/0x100 [scst]
 scst_exec_check_blocking+0xbb/0x210 [scst]
 scst_process_active_cmd+0x64d/0x1550 [scst]
 scst_cmd_thread+0x170/0x5a0 [scst]
 kthread+0x112/0x130
 ret_from_fork+0x35/0x40

See also https://github.com/bvanassche/scst/issues/26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-06-17 01:35:53 +00:00
parent 39735956c7
commit f7b704ee99
4 changed files with 30 additions and 20 deletions
-4
View File
@@ -3261,11 +3261,7 @@ static enum compl_status_e fileio_exec_async(struct vdisk_cmd_params *p)
WARN_ON_ONCE(sg_cnt != cmd->sg_cnt);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
iov_iter_kvec(&iter, dir, p->async.kvec, sg_cnt, total);
#else
iov_iter_kvec(&iter, ITER_KVEC | dir, p->async.kvec, sg_cnt, total);
#endif
*iocb = (struct kiocb) {
.ki_pos = p->loff,
.ki_filp = fd,