[PATCH 199/437] scsi: st: convert to read/write iterators

Jens Axboe
2024-04-11T15:37:13Z

drivers/scsi/st.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 5a9bcf8e0792..e96eb3607a82 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -1891,7 +1891,8 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)

return retval;
}
-\f
+FOPS_WRITE_ITER_HELPER(st_write);
+
/* Read data from the tape. Returns zero in the normal case, one if the
eof status has changed, and the negative error code in case of a
fatal error. Otherwise updates the buffer and the eof state.
@@ -2238,8 +2239,7 @@ st_read(struct file *filp, char __user *buf, size_t count, loff_t * ppos)

return retval;
}
-\f
-
+FOPS_READ_ITER_HELPER(st_read);

DEB(
/* Set the driver options */
@@ -4146,8 +4146,8 @@ __setup("st=", st_setup);
static const struct file_operations st_fops =
{
.owner = THIS_MODULE,
- .read = st_read,
- .write = st_write,
+ .read_iter = st_read_iter,
+ .write_iter = st_write_iter,
.unlocked_ioctl = st_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = st_compat_ioctl,
--
2.43.0