[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-136-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:14:35 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 135/437] fs/notify: convert to read/write iterators
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
fs/notify/fanotify/fanotify_user.c | 6 ++++--
fs/notify/inotify/inotify_user.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index fbdc63cc10d9..52b97f6c2285 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -868,6 +868,7 @@ static ssize_t fanotify_read(struct file *file, char __user *buf,
ret = buf - start;
return ret;
}
+FOPS_READ_ITER_HELPER(fanotify_read);
static ssize_t fanotify_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)
{
@@ -900,6 +901,7 @@ static ssize_t fanotify_write(struct file *file, const char __user *buf, size_t
return count;
}
+FOPS_WRITE_ITER_HELPER(fanotify_write);
static int fanotify_release(struct inode *ignored, struct file *file)
{
@@ -984,8 +986,8 @@ static long fanotify_ioctl(struct file *file, unsigned int cmd, unsigned long ar
static const struct file_operations fanotify_fops = {
.show_fdinfo = fanotify_show_fdinfo,
.poll = fanotify_poll,
- .read = fanotify_read,
- .write = fanotify_write,
+ .read_iter = fanotify_read_iter,
+ .write_iter = fanotify_write_iter,
.fasync = NULL,
.release = fanotify_release,
.unlocked_ioctl = fanotify_ioctl,
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 85d8fdd55329..bdc424a79e3c 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -297,6 +297,7 @@ static ssize_t inotify_read(struct file *file, char __user *buf,
ret = buf - start;
return ret;
}
+FOPS_READ_ITER_HELPER(inotify_read);
static int inotify_release(struct inode *ignored, struct file *file)
{
@@ -357,7 +358,7 @@ static long inotify_ioctl(struct file *file, unsigned int cmd,
static const struct file_operations inotify_fops = {
.show_fdinfo = inotify_show_fdinfo,
.poll = inotify_poll,
- .read = inotify_read,
+ .read_iter = inotify_read_iter,
.fasync = fsnotify_fasync,
.release = inotify_release,
.unlocked_ioctl = inotify_ioctl,
--
2.43.0
Powered by blists - more mailing lists