Re: [PATCH] ntfs3: remove a_ops->write_begin/end() call backs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





在 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@xxxxxxxx>
---
  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,





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux