OSDN Git Service

fs: Remove noop_invalidatepage()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 9 Feb 2022 20:21:35 +0000 (20:21 +0000)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 15 Mar 2022 12:23:29 +0000 (08:23 -0400)
We used to have to use noop_invalidatepage() to prevent
block_invalidatepage() from being called, but that behaviour is now gone.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs
Tested-by: David Howells <dhowells@redhat.com> # afs
drivers/dax/device.c
fs/ext2/inode.c
fs/ext4/inode.c
fs/fuse/dax.c
fs/libfs.c
fs/xfs/xfs_aops.c
include/linux/fs.h

index d33a061..7a59ca5 100644 (file)
@@ -347,7 +347,6 @@ static unsigned long dax_get_unmapped_area(struct file *filp,
 
 static const struct address_space_operations dev_dax_aops = {
        .set_page_dirty         = __set_page_dirty_no_writeback,
-       .invalidatepage         = noop_invalidatepage,
 };
 
 static int dax_open(struct inode *inode, struct file *filp)
index 1e14777..9b579ee 100644 (file)
@@ -1001,7 +1001,6 @@ static const struct address_space_operations ext2_dax_aops = {
        .writepages             = ext2_dax_writepages,
        .direct_IO              = noop_direct_IO,
        .set_page_dirty         = __set_page_dirty_no_writeback,
-       .invalidatepage         = noop_invalidatepage,
 };
 
 /*
index 07ef3f8..d708620 100644 (file)
@@ -3632,7 +3632,6 @@ static const struct address_space_operations ext4_dax_aops = {
        .direct_IO              = noop_direct_IO,
        .set_page_dirty         = __set_page_dirty_no_writeback,
        .bmap                   = ext4_bmap,
-       .invalidatepage         = noop_invalidatepage,
        .swap_activate          = ext4_iomap_swap_activate,
 };
 
index 182b24a..b11fa10 100644 (file)
@@ -1327,7 +1327,6 @@ static const struct address_space_operations fuse_dax_file_aops  = {
        .writepages     = fuse_dax_writepages,
        .direct_IO      = noop_direct_IO,
        .set_page_dirty = __set_page_dirty_no_writeback,
-       .invalidatepage = noop_invalidatepage,
 };
 
 static bool fuse_should_enable_dax(struct inode *inode, unsigned int flags)
index 9741252..4e04784 100644 (file)
@@ -1198,17 +1198,6 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync)
 }
 EXPORT_SYMBOL(noop_fsync);
 
-void noop_invalidatepage(struct page *page, unsigned int offset,
-               unsigned int length)
-{
-       /*
-        * There is no page cache to invalidate in the dax case, however
-        * we need this callback defined to prevent falling back to
-        * block_invalidatepage() in do_invalidatepage().
-        */
-}
-EXPORT_SYMBOL_GPL(noop_invalidatepage);
-
 ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
 {
        /*
index 51a040b..7dd314f 100644 (file)
@@ -582,6 +582,5 @@ const struct address_space_operations xfs_dax_aops = {
        .writepages             = xfs_dax_writepages,
        .direct_IO              = noop_direct_IO,
        .set_page_dirty         = __set_page_dirty_no_writeback,
-       .invalidatepage         = noop_invalidatepage,
        .swap_activate          = xfs_iomap_swapfile_activate,
 };
index bcdb613..a40ea82 100644 (file)
@@ -3323,8 +3323,6 @@ extern int simple_rename(struct user_namespace *, struct inode *,
 extern void simple_recursive_removal(struct dentry *,
                               void (*callback)(struct dentry *));
 extern int noop_fsync(struct file *, loff_t, loff_t, int);
-extern void noop_invalidatepage(struct page *page, unsigned int offset,
-               unsigned int length);
 extern ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
 extern int simple_empty(struct dentry *);
 extern int simple_write_begin(struct file *file, struct address_space *mapping,