[PATCH 2/3] fs: remove unused members in struct file_operations
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Feb 14 01:51:56 PST 2025
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 at 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
More information about the barebox
mailing list