mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 05:44:31 +08: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
@ -251,7 +251,6 @@ prototypes::
|
||||
struct page *page, void *fsdata);
|
||||
sector_t (*bmap)(struct address_space *, sector_t);
|
||||
void (*invalidate_folio) (struct folio *, size_t start, size_t len);
|
||||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
||||
int (*releasepage) (struct page *, int);
|
||||
void (*freepage)(struct page *);
|
||||
int (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
||||
@ -280,7 +279,6 @@ write_begin: locks the page exclusive
|
||||
write_end: yes, unlocks exclusive
|
||||
bmap:
|
||||
invalidate_folio: yes exclusive
|
||||
invalidatepage: yes exclusive
|
||||
releasepage: yes
|
||||
freepage: yes
|
||||
direct_IO:
|
||||
|
@ -736,7 +736,6 @@ cache in your filesystem. The following members are defined:
|
||||
struct page *page, void *fsdata);
|
||||
sector_t (*bmap)(struct address_space *, sector_t);
|
||||
void (*invalidate_folio) (struct folio *, size_t start, size_t len);
|
||||
void (*invalidatepage) (struct page *, unsigned int, unsigned int);
|
||||
int (*releasepage) (struct page *, int);
|
||||
void (*freepage)(struct page *);
|
||||
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 */
|
||||
sector_t (*bmap)(struct address_space *, sector_t);
|
||||
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);
|
||||
void (*freepage)(struct page *);
|
||||
ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
|
||||
|
@ -19,8 +19,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/pagevec.h>
|
||||
#include <linux/task_io_accounting_ops.h>
|
||||
#include <linux/buffer_head.h> /* grr. try_to_release_page,
|
||||
do_invalidatepage */
|
||||
#include <linux/buffer_head.h> /* grr. try_to_release_page */
|
||||
#include <linux/shmem_fs.h>
|
||||
#include <linux/rmap.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)
|
||||
{
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
invalidatepage = aops->invalidatepage;
|
||||
if (invalidatepage)
|
||||
(*invalidatepage)(&folio->page, offset, length);
|
||||
}
|
||||
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
|
||||
* 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
|
||||
* page aligned properly.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user