[PATCH 348/437] s390: crypto: convert to read/write iterators

Jens Axboe posted 437 patches 1 year, 8 months ago
[PATCH 348/437] s390: crypto: convert to read/write iterators
Posted by Jens Axboe 1 year, 8 months ago
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 drivers/s390/crypto/zcrypt_api.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c
index eba07f8ef308..bc2b385ea550 100644
--- a/drivers/s390/crypto/zcrypt_api.c
+++ b/drivers/s390/crypto/zcrypt_api.c
@@ -475,8 +475,7 @@ static void zcdn_destroy_all(void)
  *
  * This function is not supported beyond zcrypt 1.3.1.
  */
-static ssize_t zcrypt_read(struct file *filp, char __user *buf,
-			   size_t count, loff_t *f_pos)
+static ssize_t zcrypt_read(struct kiocb *iocb, struct iov_iter *to)
 {
 	return -EPERM;
 }
@@ -486,8 +485,7 @@ static ssize_t zcrypt_read(struct file *filp, char __user *buf,
  *
  * Write is not allowed
  */
-static ssize_t zcrypt_write(struct file *filp, const char __user *buf,
-			    size_t count, loff_t *f_pos)
+static ssize_t zcrypt_write(struct kiocb *iocb, struct iov_iter *from)
 {
 	return -EPERM;
 }
@@ -1905,8 +1903,8 @@ static long zcrypt_compat_ioctl(struct file *filp, unsigned int cmd,
  */
 static const struct file_operations zcrypt_fops = {
 	.owner		= THIS_MODULE,
-	.read		= zcrypt_read,
-	.write		= zcrypt_write,
+	.read_iter	= zcrypt_read,
+	.write_iter	= zcrypt_write,
 	.unlocked_ioctl	= zcrypt_unlocked_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl	= zcrypt_compat_ioctl,
-- 
2.43.0