[PATCH 018/437] char/dtlk: convert to read/write iterators

Jens Axboe
2024-04-11T15:32:00Z

drivers/char/dtlk.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 6946c1cad9f6..60858db14c43 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -101,8 +101,8 @@ static long dtlk_ioctl(struct file *file,
static const struct file_operations dtlk_fops =
{
.owner = THIS_MODULE,
- .read = dtlk_read,
- .write = dtlk_write,
+ .read_iter = dtlk_read_iter,
+ .write_iter = dtlk_write_iter,
.poll = dtlk_poll,
.unlocked_ioctl = dtlk_ioctl,
.open = dtlk_open,
@@ -155,6 +155,7 @@ static ssize_t dtlk_read(struct file *file, char __user *buf,
TRACE_RET;
return -EAGAIN;
}
+FOPS_READ_ITER_HELPER(dtlk_read);

static ssize_t dtlk_write(struct file *file, const char __user *buf,
size_t count, loff_t * ppos)
@@ -228,6 +229,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
TRACE_RET;
return -EAGAIN;
}
+FOPS_WRITE_ITER_HELPER(dtlk_write);

static __poll_t dtlk_poll(struct file *file, poll_table * wait)
{
--
2.43.0