提交 0d03943c 编写于 作者: T Thomas de Beauchene 提交者: Jonathan Corbet

Documentation: filesystems: updated struct file_operations documentation in vfs.txt

Updated struct file_operations documentation in vfs.txt to match
current implementation
Signed-off-by: NThomas de Beauchene <chauvo_t@epitech.eu>
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 bd55daf4
...@@ -797,7 +797,7 @@ struct file_operations ...@@ -797,7 +797,7 @@ struct file_operations
---------------------- ----------------------
This describes how the VFS can manipulate an open file. As of kernel This describes how the VFS can manipulate an open file. As of kernel
3.12, the following members are defined: 4.1, the following members are defined:
struct file_operations { struct file_operations {
struct module *owner; struct module *owner;
...@@ -811,8 +811,9 @@ struct file_operations { ...@@ -811,8 +811,9 @@ struct file_operations {
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
long (*compat_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
int (*mmap) (struct file *, struct vm_area_struct *); int (*mmap) (struct file *, struct vm_area_struct *);
int (*mremap)(struct file *, struct vm_area_struct *);
int (*open) (struct inode *, struct file *); int (*open) (struct inode *, struct file *);
int (*flush) (struct file *); int (*flush) (struct file *, fl_owner_t id);
int (*release) (struct inode *, struct file *); int (*release) (struct inode *, struct file *);
int (*fsync) (struct file *, loff_t, loff_t, int datasync); int (*fsync) (struct file *, loff_t, loff_t, int datasync);
int (*aio_fsync) (struct kiocb *, int datasync); int (*aio_fsync) (struct kiocb *, int datasync);
...@@ -822,11 +823,15 @@ struct file_operations { ...@@ -822,11 +823,15 @@ struct file_operations {
unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
int (*check_flags)(int); int (*check_flags)(int);
int (*flock) (struct file *, int, struct file_lock *); int (*flock) (struct file *, int, struct file_lock *);
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
int (*setlease)(struct file *, long arg, struct file_lock **, void **); int (*setlease)(struct file *, long, struct file_lock **, void **);
long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); long (*fallocate)(struct file *file, int mode, loff_t offset,
loff_t len);
void (*show_fdinfo)(struct seq_file *m, struct file *f); void (*show_fdinfo)(struct seq_file *m, struct file *f);
#ifndef CONFIG_MMU
unsigned (*mmap_capabilities)(struct file *);
#endif
}; };
Again, all methods are called without any locks being held, unless Again, all methods are called without any locks being held, unless
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册