From 87005fe89ac9efffd4aeafbc579cf77bedc2f0ac Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 6 Oct 2016 19:10:00 +0000 Subject: [PATCH] scst_vdisk: Rename blockio_rw_sync() into blockio_read_sync() git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6990 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index e543bdcbb..6a16831f0 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -7067,7 +7067,7 @@ static void blockio_end_sync_io(struct bio *bio) } /** - * blockio_rw_sync() - read or write up to @len bytes from a block I/O device + * blockio_read_sync() - read up to @len bytes from a block I/O device * * Returns: * - A negative value if an error occurred. @@ -7077,8 +7077,8 @@ static void blockio_end_sync_io(struct bio *bio) * Note: * Increments *@loff with the number of bytes transferred upon success. */ -static ssize_t blockio_rw_sync(struct scst_vdisk_dev *virt_dev, void *buf, - size_t len, loff_t *loff, unsigned int rw) +static ssize_t blockio_read_sync(struct scst_vdisk_dev *virt_dev, void *buf, + size_t len, loff_t *loff) { struct bio_priv_sync s = { COMPLETION_INITIALIZER_ONSTACK(s.c), 0, @@ -7114,7 +7114,7 @@ static ssize_t blockio_rw_sync(struct scst_vdisk_dev *virt_dev, void *buf, if (!bio) goto out; - bio->bi_rw = rw; + bio->bi_rw = READ_SYNC; bio->bi_bdev = bdev; bio->bi_end_io = blockio_end_sync_io; bio->bi_private = &s; @@ -7141,7 +7141,7 @@ static ssize_t blockio_rw_sync(struct scst_vdisk_dev *virt_dev, void *buf, } } } - submit_bio(rw, bio); + submit_bio(bio->bi_rw, bio); #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 6, 0)) submitted = true; #endif @@ -7188,8 +7188,8 @@ static ssize_t vdev_read_sync(struct scst_vdisk_dev *virt_dev, void *buf, return len; } else if (virt_dev->blockio) { for (read = 0; read < len; read += res) { - res = blockio_rw_sync(virt_dev, buf + read, len - read, - loff, READ_SYNC); + res = blockio_read_sync(virt_dev, buf + read, + len - read, loff); if (res < 0) return res; }