From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/3] fs: remove unused members in struct file_operations
Date: Fri, 14 Feb 2025 10:51:56 +0100 [thread overview]
Message-ID: <20250214095157.2850839-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250214095157.2850839-1-a.fatoum@pengutronix.de>
Eventually, we want to actually use these members in struct file_operations,
but until we do so, having them there without effect only causes
confusion.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/jffs2/dir.c | 1 -
fs/ubifs/dir.c | 2 +-
include/linux/fs.h | 8 ++++----
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 94ef51f77881..48584466724d 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -26,7 +26,6 @@ static struct dentry *jffs2_lookup (struct inode *,struct dentry *,
const struct file_operations jffs2_dir_operations =
{
- .read = NULL,
.iterate = jffs2_readdir,
};
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index a16546e615b7..98a4ec6b81e8 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -492,7 +492,7 @@ const struct inode_operations ubifs_dir_inode_operations = {
const struct file_operations ubifs_dir_operations = {
/* .llseek = NULL, not present in barebox */
/* .release = NULL, not present in barebox */
- .read = NULL, /* not present in barebox */
+/* .read = NULL, not present in barebox */
.iterate = ubifs_readdir,
/* .fsync = NULL, not present in barebox */
/* .unlocked_ioctl = NULL, not present in barebox */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 28d3146516a6..7461eb367d07 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -456,10 +456,10 @@ struct file_operations {
int (*open) (struct inode *, struct file *);
int (*release) (struct inode *, struct file *);
int (*iterate) (struct file *, struct dir_context *);
- ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
- ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
- int (*ioctl) (struct file *, unsigned int request, void *buf);
- int (*truncate) (struct file *, loff_t);
+ /*
+ * TODO: move the remaining callbacks in struct fs_driver
+ * here with Linux semantics
+ */
};
void drop_nlink(struct inode *inode);
--
2.39.5
next prev parent reply other threads:[~2025-02-14 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 9:51 [PATCH 1/3] fs: move fs_driver open/close into " Ahmad Fatoum
2025-02-14 9:51 ` Ahmad Fatoum [this message]
2025-02-14 9:51 ` [PATCH 3/3] fs: drop unused FS_DRIVER_NO_DEV flag Ahmad Fatoum
2025-02-17 10:26 ` [PATCH 1/3] fs: move fs_driver open/close into struct file_operations Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250214095157.2850839-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox