[PATCH RFC 07/10] sysfs: drop callback bin_attribute::llseek

Thomas Weißschuh posted 10 patches 3 weeks, 3 days ago
There is a newer version of this series
[PATCH RFC 07/10] sysfs: drop callback bin_attribute::llseek
Posted by Thomas Weißschuh 3 weeks, 3 days ago
The callback is never implemented, drop it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
 fs/sysfs/file.c       | 8 +-------
 include/linux/sysfs.h | 2 --
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 6d39696b43069010b0ad0bdaadcf9002cb70c92c..3515c172ec8ff70b87847d226a1b3bc3b60826f9 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -170,13 +170,7 @@ static int sysfs_kf_bin_mmap(struct kernfs_open_file *of,
 static loff_t sysfs_kf_bin_llseek(struct kernfs_open_file *of, loff_t offset,
 				  int whence)
 {
-	struct bin_attribute *battr = of->kn->priv;
-	struct kobject *kobj = of->kn->parent->priv;
-
-	if (battr->llseek)
-		return battr->llseek(of->file, kobj, battr, offset, whence);
-	else
-		return generic_file_llseek(of->file, offset, whence);
+	return generic_file_llseek(of->file, offset, whence);
 }
 
 static int sysfs_kf_bin_open(struct kernfs_open_file *of)
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 9fcdc8cd3118f359742bfd8b708d5c3eff511042..8344c0198c61cc44995c38d46d926360e7a88873 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -307,8 +307,6 @@ struct bin_attribute {
 			char *, loff_t, size_t);
 	ssize_t (*write)(struct file *, struct kobject *, struct bin_attribute *,
 			 char *, loff_t, size_t);
-	loff_t (*llseek)(struct file *, struct kobject *, struct bin_attribute *,
-			 loff_t, int);
 	int (*mmap)(struct file *, struct kobject *, const struct bin_attribute *attr,
 		    struct vm_area_struct *vma);
 };

-- 
2.47.0