From: Mohamed Ali Bouhaouala Update outdated VFS operation prototypes in locking.rst to match their current definitions. Add the missing d_prune and sync_inode_metadata callbacks, and correct the signatures of existing operations. Update the locking table to include sync_inode_metadata. Signed-off-by: Mohamed Ali Bouhaouala --- v2: - Use the contributor's full name in the author and sign-off fields. Documentation/filesystems/locking.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Documentation/filesystems/locking.rst b/Documentation/filesystems/locking.rst index f7363ad770c7..a6a011858ada 100644 --- a/Documentation/filesystems/locking.rst +++ b/Documentation/filesystems/locking.rst @@ -26,6 +26,7 @@ prototypes:: int (*d_delete)(struct dentry *); int (*d_init)(struct dentry *); void (*d_release)(struct dentry *); + void (*d_prune)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); char *(*d_dname)(struct dentry *dentry, char *buffer, int buflen); struct vfsmount *(*d_automount)(struct path *path); @@ -80,8 +81,8 @@ prototypes:: int (*getattr) (const struct mnt_idmap *, const struct path *, struct kstat *, u32, unsigned int); ssize_t (*listxattr) (struct dentry *, char *, size_t); int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); - void (*update_time)(struct inode *inode, enum fs_update_time type, - int flags); + int (*update_time)(struct inode *inode, enum fs_update_time type, + unsigned int flags); void (*sync_lazytime)(struct inode *inode); int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, @@ -173,6 +174,7 @@ prototypes:: void (*destroy_inode)(struct inode *); void (*dirty_inode) (struct inode *, int flags); int (*write_inode) (struct inode *, struct writeback_control *wbc); + int (*sync_inode_metadata)(struct inode *inode, struct writeback_control *wbc); int (*drop_inode) (struct inode *); void (*evict_inode) (struct inode *); void (*put_super) (struct super_block *); @@ -196,6 +198,7 @@ free_inode: called from RCU callback destroy_inode: dirty_inode: write_inode: +sync_inode_metadata: drop_inode: !!!inode->i_lock!!! evict_inode: put_super: write @@ -255,7 +258,7 @@ prototypes:: loff_t pos, unsigned len, unsigned copied, struct folio *folio, void *fsdata); sector_t (*bmap)(struct address_space *, sector_t); - void (*invalidate_folio) (struct folio *, size_t start, size_t len); + void (*invalidate_folio) (struct folio *, size_t offset, size_t len); bool (*release_folio)(struct folio *, gfp_t); void (*free_folio)(struct folio *); int (*direct_IO)(struct kiocb *, struct iov_iter *iter); @@ -265,7 +268,7 @@ prototypes:: bool (*is_partially_uptodate)(struct folio *, size_t from, size_t count); int (*error_remove_folio)(struct address_space *, struct folio *); int (*swap_activate)(struct swap_info_struct *sis, struct file *f, sector_t *span) - int (*swap_deactivate)(struct file *); + void (*swap_deactivate)(struct file *); locking rules: All except dirty_folio and free_folio may block @@ -455,14 +458,15 @@ prototypes:: ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); - int (*iopoll) (struct kiocb *kiocb, bool spin); + int (*iopoll)(struct kiocb *kiocb, struct io_comp_batch *, + unsigned int flags); int (*iterate_shared) (struct file *, struct dir_context *); __poll_t (*poll) (struct file *, struct poll_table_struct *); long (*unlocked_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 (*open) (struct inode *, struct file *); - int (*flush) (struct file *); + int (*flush) (struct file *, fl_owner_t id); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, loff_t start, loff_t end, int datasync); int (*fasync) (int, struct file *, int); @@ -475,7 +479,7 @@ prototypes:: 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, struct file_lock **, void **); + int (*setlease)(struct file *, int, struct file_lease **, void **); long (*fallocate)(struct file *, int, loff_t, loff_t); void (*show_fdinfo)(struct seq_file *m, struct file *f); unsigned (*mmap_capabilities)(struct file *); -- 2.43.0