History

fs: Remove aops->invalidatepage

With all users migrated to ->invalidate_folio, remove the old operation.

Matthew Wilcox (Oracle) committed 4 years ago

Commit f50015a1 parent 58a2fdb4 files · +3 −15Browse files

Unified · Split

4 files
  1. Documentation/filesystems/locking.rst +0 −2
  2. Documentation/filesystems/vfs.rst +0 −1
  3. include/linux/fs.h +0 −1
  4. mm/truncate.c +3 −11
Documentation/filesystems/locking.rst+0−2
@@ -251,7 +251,6 @@ prototypes:: · 250 unmodified lines
251251 struct page *page, void *fsdata);
252252 sector_t (*bmap)(struct address_space *, sector_t);
253253 void (*invalidate_folio) (struct folio *, size_t start, size_t len);
254− void (*invalidatepage) (struct page *, unsigned int, unsigned int);
255254 int (*releasepage) (struct page *, int);
256255 void (*freepage)(struct page *);
257256 int (*direct_IO)(struct kiocb *, struct iov_iter *iter);
@@ -280,7 +279,6 @@ write_begin: locks the page exclusive · 22 unmodified lines
280279 write_end: yes, unlocks exclusive
281280 bmap:
282281 invalidate_folio: yes exclusive
283−invalidatepage: yes exclusive
284282 releasepage: yes
285283 freepage: yes
286284 direct_IO:
Documentation/filesystems/vfs.rst+0−1
@@ -736,7 +736,6 @@ cache in your filesystem. The following members are defined: · 735 unmodified lines
736736 struct page *page, void *fsdata);
737737 sector_t (*bmap)(struct address_space *, sector_t);
738738 void (*invalidate_folio) (struct folio *, size_t start, size_t len);
739− void (*invalidatepage) (struct page *, unsigned int, unsigned int);
740739 int (*releasepage) (struct page *, int);
741740 void (*freepage)(struct page *);
742741 ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
include/linux/fs.h+0−1
@@ -388,7 +388,6 @@ struct address_space_operations { · 387 unmodified lines
388388 /* Unfortunately this kludge is needed for FIBMAP. Don't use it */
389389 sector_t (*bmap)(struct address_space *, sector_t);
390390 void (*invalidate_folio) (struct folio *, size_t offset, size_t len);
391− void (*invalidatepage) (struct page *, unsigned int, unsigned int);
392391 int (*releasepage) (struct page *, gfp_t);
393392 void (*freepage)(struct page *);
394393 ssize_t (*direct_IO)(struct kiocb *, struct iov_iter *iter);
mm/truncate.c+3−11
@@ -19,8 +19,7 @@ · 18 unmodified lines
1919 #include <linux/highmem.h>
2020 #include <linux/pagevec.h>
2121 #include <linux/task_io_accounting_ops.h>
22−#include <linux/buffer_head.h> /* grr. try_to_release_page,
23− do_invalidatepage */
22+#include <linux/buffer_head.h> /* grr. try_to_release_page */
2423 #include <linux/shmem_fs.h>
2524 #include <linux/rmap.h>
2625 #include "internal.h"
@@ -155,16 +154,9 @@ static int invalidate_exceptional_entry2(struct address_space *mapping, · 128 unmodified lines
155154 void folio_invalidate(struct folio *folio, size_t offset, size_t length)
156155 {
157156 const struct address_space_operations *aops = folio->mapping->a_ops;
158− void (*invalidatepage)(struct page *, unsigned int, unsigned int);
159157
160− if (aops->invalidate_folio) {
158+ if (aops->invalidate_folio)
161159 aops->invalidate_folio(folio, offset, length);
162− return;
163− }
164−
165− invalidatepage = aops->invalidatepage;
166− if (invalidatepage)
167− (*invalidatepage)(&folio->page, offset, length);
168160 }
169161 EXPORT_SYMBOL_GPL(folio_invalidate);
170162
@@ -334,7 +326,7 @@ int invalidate_inode_page(struct page *page) · 163 unmodified lines
334326 * mapping is large, it is probably the case that the final pages are the most
335327 * recently touched, and freeing happens in ascending file offset order.
336328 *
337− * Note that since ->invalidatepage() accepts range to invalidate
329+ * Note that since ->invalidate_folio() accepts range to invalidate
338330 * truncate_inode_pages_range is able to handle cases where lend + 1 is not
339331 * page aligned properly.
340332 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t