proc: mandate ->proc_lseek in "struct proc_ops"
Now that proc_ops are separate from file_operations and other operations it easy to check all instances to have ->proc_lseek hook and remove check in main code. Note: nonseekable_open() files naturally don't require ->proc_lseek. Garbage collect pde_lseek() function. [adobriyan@gmail.com: smoke test lseek()] Link: https://lkml.kernel.org/r/YG4OIhChOrVTPgdN@localhost.localdomain Link: https://lkml.kernel.org/r/YFYX0Bzwxlc7aBa/@localhost.localdomain Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b793cd9ab3
commit
d4455faccd
@@ -32,6 +32,7 @@ struct proc_ops {
|
||||
ssize_t (*proc_read)(struct file *, char __user *, size_t, loff_t *);
|
||||
ssize_t (*proc_read_iter)(struct kiocb *, struct iov_iter *);
|
||||
ssize_t (*proc_write)(struct file *, const char __user *, size_t, loff_t *);
|
||||
/* mandatory unless nonseekable_open() or equivalent is used */
|
||||
loff_t (*proc_lseek)(struct file *, loff_t, int);
|
||||
int (*proc_release)(struct inode *, struct file *);
|
||||
__poll_t (*proc_poll)(struct file *, struct poll_table_struct *);
|
||||
|
||||
Reference in New Issue
Block a user