Message ID | ec1574d80e4b98726e6005a31f3766d84810ca6a.1731387379.git.wqu@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ntfs3: remove a_ops->write_begin/end() call backs | expand |
在 2024/11/12 15:28, Qu Wenruo 写道: > Currently a_ops->write_begin/end() helpers are only called by the > following exported functions: > - generic_perform_write() > - generic_cont_expand_simple() > - cont_write_begin() > - page_symlink() Please drop this patch. There are two more exported callers: - __generic_file_write_iter() - generic_file_write_iter() And ntfs3 utilizes __generic_file_write_iter(), so the write_begin/end() call backs are still required. Thanks, Qu > > NTFS3 doesn't utilize any of the above functions, thus there is no need to > assign write_begin() nor write_end() call backs in its > address_space_operations structure. > > The functions ntfs_write_begin() and ntfs_write_end() are directly > called inside ntfs_extend_initialized_size() only. > > Signed-off-by: Qu Wenruo <wqu@suse.com> > --- > fs/ntfs3/inode.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c > index be04d2845bb7..6b4a11467c65 100644 > --- a/fs/ntfs3/inode.c > +++ b/fs/ntfs3/inode.c > @@ -947,9 +947,6 @@ int ntfs_write_begin(struct file *file, struct address_space *mapping, > return err; > } > > -/* > - * ntfs_write_end - Address_space_operations::write_end. > - */ > int ntfs_write_end(struct file *file, struct address_space *mapping, loff_t pos, > u32 len, u32 copied, struct folio *folio, void *fsdata) > { > @@ -2092,8 +2089,6 @@ const struct address_space_operations ntfs_aops = { > .read_folio = ntfs_read_folio, > .readahead = ntfs_readahead, > .writepages = ntfs_writepages, > - .write_begin = ntfs_write_begin, > - .write_end = ntfs_write_end, > .direct_IO = ntfs_direct_IO, > .bmap = ntfs_bmap, > .dirty_folio = block_dirty_folio,
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c index be04d2845bb7..6b4a11467c65 100644 --- a/fs/ntfs3/inode.c +++ b/fs/ntfs3/inode.c @@ -947,9 +947,6 @@ int ntfs_write_begin(struct file *file, struct address_space *mapping, return err; } -/* - * ntfs_write_end - Address_space_operations::write_end. - */ int ntfs_write_end(struct file *file, struct address_space *mapping, loff_t pos, u32 len, u32 copied, struct folio *folio, void *fsdata) { @@ -2092,8 +2089,6 @@ const struct address_space_operations ntfs_aops = { .read_folio = ntfs_read_folio, .readahead = ntfs_readahead, .writepages = ntfs_writepages, - .write_begin = ntfs_write_begin, - .write_end = ntfs_write_end, .direct_IO = ntfs_direct_IO, .bmap = ntfs_bmap, .dirty_folio = block_dirty_folio,
Currently a_ops->write_begin/end() helpers are only called by the following exported functions: - generic_perform_write() - generic_cont_expand_simple() - cont_write_begin() - page_symlink() NTFS3 doesn't utilize any of the above functions, thus there is no need to assign write_begin() nor write_end() call backs in its address_space_operations structure. The functions ntfs_write_begin() and ntfs_write_end() are directly called inside ntfs_extend_initialized_size() only. Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/ntfs3/inode.c | 5 ----- 1 file changed, 5 deletions(-)