Skip to content

Commit 5660a86

Browse files
author
Matthew Wilcox (Oracle)
committed
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: 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
1 parent 7ba13ab commit 5660a86

File tree

7 files changed

+0
-18
lines changed

7 files changed

+0
-18
lines changed

drivers/dax/device.c

-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ static unsigned long dax_get_unmapped_area(struct file *filp,
347347

348348
static const struct address_space_operations dev_dax_aops = {
349349
.set_page_dirty = __set_page_dirty_no_writeback,
350-
.invalidatepage = noop_invalidatepage,
351350
};
352351

353352
static int dax_open(struct inode *inode, struct file *filp)

fs/ext2/inode.c

-1
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,6 @@ static const struct address_space_operations ext2_dax_aops = {
10011001
.writepages = ext2_dax_writepages,
10021002
.direct_IO = noop_direct_IO,
10031003
.set_page_dirty = __set_page_dirty_no_writeback,
1004-
.invalidatepage = noop_invalidatepage,
10051004
};
10061005

10071006
/*

fs/ext4/inode.c

-1
Original file line numberDiff line numberDiff line change
@@ -3632,7 +3632,6 @@ static const struct address_space_operations ext4_dax_aops = {
36323632
.direct_IO = noop_direct_IO,
36333633
.set_page_dirty = __set_page_dirty_no_writeback,
36343634
.bmap = ext4_bmap,
3635-
.invalidatepage = noop_invalidatepage,
36363635
.swap_activate = ext4_iomap_swap_activate,
36373636
};
36383637

fs/fuse/dax.c

-1
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,6 @@ static const struct address_space_operations fuse_dax_file_aops = {
13271327
.writepages = fuse_dax_writepages,
13281328
.direct_IO = noop_direct_IO,
13291329
.set_page_dirty = __set_page_dirty_no_writeback,
1330-
.invalidatepage = noop_invalidatepage,
13311330
};
13321331

13331332
static bool fuse_should_enable_dax(struct inode *inode, unsigned int flags)

fs/libfs.c

-11
Original file line numberDiff line numberDiff line change
@@ -1198,17 +1198,6 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync)
11981198
}
11991199
EXPORT_SYMBOL(noop_fsync);
12001200

1201-
void noop_invalidatepage(struct page *page, unsigned int offset,
1202-
unsigned int length)
1203-
{
1204-
/*
1205-
* There is no page cache to invalidate in the dax case, however
1206-
* we need this callback defined to prevent falling back to
1207-
* block_invalidatepage() in do_invalidatepage().
1208-
*/
1209-
}
1210-
EXPORT_SYMBOL_GPL(noop_invalidatepage);
1211-
12121201
ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
12131202
{
12141203
/*

fs/xfs/xfs_aops.c

-1
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,5 @@ const struct address_space_operations xfs_dax_aops = {
582582
.writepages = xfs_dax_writepages,
583583
.direct_IO = noop_direct_IO,
584584
.set_page_dirty = __set_page_dirty_no_writeback,
585-
.invalidatepage = noop_invalidatepage,
586585
.swap_activate = xfs_iomap_swapfile_activate,
587586
};

include/linux/fs.h

-2
Original file line numberDiff line numberDiff line change
@@ -3323,8 +3323,6 @@ extern int simple_rename(struct user_namespace *, struct inode *,
33233323
extern void simple_recursive_removal(struct dentry *,
33243324
void (*callback)(struct dentry *));
33253325
extern int noop_fsync(struct file *, loff_t, loff_t, int);
3326-
extern void noop_invalidatepage(struct page *page, unsigned int offset,
3327-
unsigned int length);
33283326
extern ssize_t noop_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
33293327
extern int simple_empty(struct dentry *);
33303328
extern int simple_write_begin(struct file *file, struct address_space *mapping,

0 commit comments

Comments
 (0)