mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 01:59:51 +02:00
fs: Remove aops->invalidatepage
With all users migrated to ->invalidate_folio, remove the old operation. 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
This commit is contained in:
parent
58a2fdb61b
commit
f50015a596
4 changed files with 3 additions and 15 deletions
|
|
@ -251,7 +251,6 @@ prototypes::
|
||||||
struct page *page, void *fsdata);
|
struct page *page, void *fsdata);
|
||||||
sector_t (*bmap)(struct address_space *, sector_t);
|
sector_t (*bmap)(struct address_space *, sector_t);
|
||||||
void (*invalidate_folio) (struct folio *, size_t start, size_t len);
|
void (*invalidate_folio) (struct folio *, size_t start, size_t len);
|
||||||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
|
||||||
int (*releasepage) (struct page *, int);
|
int (*releasepage) (struct page *, int);
|
||||||
void (*freepage)(struct page *);
|
void (*freepage)(struct page *);
|
||||||
int (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
int (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
||||||
|
|
@ -280,7 +279,6 @@ write_begin: locks the page exclusive
|
||||||
write_end: yes, unlocks exclusive
|
write_end: yes, unlocks exclusive
|
||||||
bmap:
|
bmap:
|
||||||
invalidate_folio: yes exclusive
|
invalidate_folio: yes exclusive
|
||||||
invalidatepage: yes exclusive
|
|
||||||
releasepage: yes
|
releasepage: yes
|
||||||
freepage: yes
|
freepage: yes
|
||||||
direct_IO:
|
direct_IO:
|
||||||
|
|
|
||||||
|
|
@ -736,7 +736,6 @@ cache in your filesystem. The following members are defined:
|
||||||
struct page *page, void *fsdata);
|
struct page *page, void *fsdata);
|
||||||
sector_t (*bmap)(struct address_space *, sector_t);
|
sector_t (*bmap)(struct address_space *, sector_t);
|
||||||
void (*invalidate_folio) (struct folio *, size_t start, size_t len);
|
void (*invalidate_folio) (struct folio *, size_t start, size_t len);
|
||||||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
|
||||||
int (*releasepage) (struct page *, int);
|
int (*releasepage) (struct page *, int);
|
||||||
void (*freepage)(struct page *);
|
void (*freepage)(struct page *);
|
||||||
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,6 @@ struct address_space_operations {
|
||||||
/* Unfortunately this kludge is needed for FIBMAP. Don't use it */
|
/* Unfortunately this kludge is needed for FIBMAP. Don't use it */
|
||||||
sector_t (*bmap)(struct address_space *, sector_t);
|
sector_t (*bmap)(struct address_space *, sector_t);
|
||||||
void (*invalidate_folio) (struct folio *, size_t offset, size_t len);
|
void (*invalidate_folio) (struct folio *, size_t offset, size_t len);
|
||||||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
|
||||||
int (*releasepage) (struct page *, gfp_t);
|
int (*releasepage) (struct page *, gfp_t);
|
||||||
void (*freepage)(struct page *);
|
void (*freepage)(struct page *);
|
||||||
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
#include <linux/pagevec.h>
|
#include <linux/pagevec.h>
|
||||||
#include <linux/task_io_accounting_ops.h>
|
#include <linux/task_io_accounting_ops.h>
|
||||||
#include <linux/buffer_head.h> /* grr. try_to_release_page,
|
#include <linux/buffer_head.h> /* grr. try_to_release_page */
|
||||||
do_invalidatepage */
|
|
||||||
#include <linux/shmem_fs.h>
|
#include <linux/shmem_fs.h>
|
||||||
#include <linux/rmap.h>
|
#include <linux/rmap.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
@ -155,16 +154,9 @@ static int invalidate_exceptional_entry2(struct address_space *mapping,
|
||||||
void folio_invalidate(struct folio *folio, size_t offset, size_t length)
|
void folio_invalidate(struct folio *folio, size_t offset, size_t length)
|
||||||
{
|
{
|
||||||
const struct address_space_operations *aops = folio->mapping->a_ops;
|
const struct address_space_operations *aops = folio->mapping->a_ops;
|
||||||
void (*invalidatepage)(struct page *, unsigned int, unsigned int);
|
|
||||||
|
|
||||||
if (aops->invalidate_folio) {
|
if (aops->invalidate_folio)
|
||||||
aops->invalidate_folio(folio, offset, length);
|
aops->invalidate_folio(folio, offset, length);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
invalidatepage = aops->invalidatepage;
|
|
||||||
if (invalidatepage)
|
|
||||||
(*invalidatepage)(&folio->page, offset, length);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(folio_invalidate);
|
EXPORT_SYMBOL_GPL(folio_invalidate);
|
||||||
|
|
||||||
|
|
@ -334,7 +326,7 @@ int invalidate_inode_page(struct page *page)
|
||||||
* mapping is large, it is probably the case that the final pages are the most
|
* mapping is large, it is probably the case that the final pages are the most
|
||||||
* recently touched, and freeing happens in ascending file offset order.
|
* recently touched, and freeing happens in ascending file offset order.
|
||||||
*
|
*
|
||||||
* Note that since ->invalidatepage() accepts range to invalidate
|
* Note that since ->invalidate_folio() accepts range to invalidate
|
||||||
* truncate_inode_pages_range is able to handle cases where lend + 1 is not
|
* truncate_inode_pages_range is able to handle cases where lend + 1 is not
|
||||||
* page aligned properly.
|
* page aligned properly.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue