fs: Remove noop_invalidatepage()

We used to have to use noop_invalidatepage() to prevent
block_invalidatepage() from being called, but that behaviour is now gone.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs
Tested-by: David Howells <dhowells@redhat.com> # afs
parent 7ba13abb
...@@ -347,7 +347,6 @@ static unsigned long dax_get_unmapped_area(struct file *filp, ...@@ -347,7 +347,6 @@ static unsigned long dax_get_unmapped_area(struct file *filp,
static const struct address_space_operations dev_dax_aops = { static const struct address_space_operations dev_dax_aops = {
.set_page_dirty = __set_page_dirty_no_writeback, .set_page_dirty = __set_page_dirty_no_writeback,
.invalidatepage = noop_invalidatepage,
}; };
static int dax_open(struct inode *inode, struct file *filp) static int dax_open(struct inode *inode, struct file *filp)
......
...@@ -1001,7 +1001,6 @@ static const struct address_space_operations ext2_dax_aops = { ...@@ -1001,7 +1001,6 @@ static const struct address_space_operations ext2_dax_aops = {
.writepages = ext2_dax_writepages, .writepages = ext2_dax_writepages,
.direct_IO = noop_direct_IO, .direct_IO = noop_direct_IO,
.set_page_dirty = __set_page_dirty_no_writeback, .set_page_dirty = __set_page_dirty_no_writeback,
.invalidatepage = noop_invalidatepage,
}; };
/* /*
......
...@@ -3632,7 +3632,6 @@ static const struct address_space_operations ext4_dax_aops = { ...@@ -3632,7 +3632,6 @@ static const struct address_space_operations ext4_dax_aops = {
.direct_IO = noop_direct_IO, .direct_IO = noop_direct_IO,
.set_page_dirty = __set_page_dirty_no_writeback, .set_page_dirty = __set_page_dirty_no_writeback,
.bmap = ext4_bmap, .bmap = ext4_bmap,
.invalidatepage = noop_invalidatepage,
.swap_activate = ext4_iomap_swap_activate, .swap_activate = ext4_iomap_swap_activate,
}; };
......
...@@ -1327,7 +1327,6 @@ static const struct address_space_operations fuse_dax_file_aops = { ...@@ -1327,7 +1327,6 @@ static const struct address_space_operations fuse_dax_file_aops = {
.writepages = fuse_dax_writepages, .writepages = fuse_dax_writepages,
.direct_IO = noop_direct_IO, .direct_IO = noop_direct_IO,
.set_page_dirty = __set_page_dirty_no_writeback, .set_page_dirty = __set_page_dirty_no_writeback,
.invalidatepage = noop_invalidatepage,
}; };
static bool fuse_should_enable_dax(struct inode *inode, unsigned int flags) static bool fuse_should_enable_dax(struct inode *inode, unsigned int flags)
......
...@@ -1198,17 +1198,6 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync) ...@@ -1198,17 +1198,6 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync)
} }
EXPORT_SYMBOL(noop_fsync); 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) ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
{ {
/* /*
......
...@@ -582,6 +582,5 @@ const struct address_space_operations xfs_dax_aops = { ...@@ -582,6 +582,5 @@ const struct address_space_operations xfs_dax_aops = {
.writepages = xfs_dax_writepages, .writepages = xfs_dax_writepages,
.direct_IO = noop_direct_IO, .direct_IO = noop_direct_IO,
.set_page_dirty = __set_page_dirty_no_writeback, .set_page_dirty = __set_page_dirty_no_writeback,
.invalidatepage = noop_invalidatepage,
.swap_activate = xfs_iomap_swapfile_activate, .swap_activate = xfs_iomap_swapfile_activate,
}; };
...@@ -3323,8 +3323,6 @@ extern int simple_rename(struct user_namespace *, struct inode *, ...@@ -3323,8 +3323,6 @@ extern int simple_rename(struct user_namespace *, struct inode *,
extern void simple_recursive_removal(struct dentry *, extern void simple_recursive_removal(struct dentry *,
void (*callback)(struct dentry *)); void (*callback)(struct dentry *));
extern int noop_fsync(struct file *, loff_t, loff_t, int); 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 ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
extern int simple_empty(struct dentry *); extern int simple_empty(struct dentry *);
extern int simple_write_begin(struct file *file, struct address_space *mapping, extern int simple_write_begin(struct file *file, struct address_space *mapping,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment