[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-19-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:12:38 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 018/437] char/dtlk: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
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
Powered by blists - more mailing lists