diff options
Diffstat (limited to 'Documentation/filesystems/vfs.txt')
-rw-r--r-- | Documentation/filesystems/vfs.txt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index ed7e5efc06d8..20899e095e7e 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -534,6 +534,7 @@ struct address_space_operations { | |||
534 | sector_t (*bmap)(struct address_space *, sector_t); | 534 | sector_t (*bmap)(struct address_space *, sector_t); |
535 | int (*invalidatepage) (struct page *, unsigned long); | 535 | int (*invalidatepage) (struct page *, unsigned long); |
536 | int (*releasepage) (struct page *, int); | 536 | int (*releasepage) (struct page *, int); |
537 | void (*freepage)(struct page *); | ||
537 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 538 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
538 | loff_t offset, unsigned long nr_segs); | 539 | loff_t offset, unsigned long nr_segs); |
539 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 540 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
@@ -660,11 +661,10 @@ struct address_space_operations { | |||
660 | releasepage: releasepage is called on PagePrivate pages to indicate | 661 | releasepage: releasepage is called on PagePrivate pages to indicate |
661 | that the page should be freed if possible. ->releasepage | 662 | that the page should be freed if possible. ->releasepage |
662 | should remove any private data from the page and clear the | 663 | should remove any private data from the page and clear the |
663 | PagePrivate flag. It may also remove the page from the | 664 | PagePrivate flag. If releasepage() fails for some reason, it must |
664 | address_space. If this fails for some reason, it may indicate | 665 | indicate failure with a 0 return value. |
665 | failure with a 0 return value. | 666 | releasepage() is used in two distinct though related cases. The |
666 | This is used in two distinct though related cases. The first | 667 | first is when the VM finds a clean page with no active users and |
667 | is when the VM finds a clean page with no active users and | ||
668 | wants to make it a free page. If ->releasepage succeeds, the | 668 | wants to make it a free page. If ->releasepage succeeds, the |
669 | page will be removed from the address_space and become free. | 669 | page will be removed from the address_space and become free. |
670 | 670 | ||
@@ -679,6 +679,12 @@ struct address_space_operations { | |||
679 | need to ensure this. Possibly it can clear the PageUptodate | 679 | need to ensure this. Possibly it can clear the PageUptodate |
680 | bit if it cannot free private data yet. | 680 | bit if it cannot free private data yet. |
681 | 681 | ||
682 | freepage: freepage is called once the page is no longer visible in | ||
683 | the page cache in order to allow the cleanup of any private | ||
684 | data. Since it may be called by the memory reclaimer, it | ||
685 | should not assume that the original address_space mapping still | ||
686 | exists, and it should not block. | ||
687 | |||
682 | direct_IO: called by the generic read/write routines to perform | 688 | direct_IO: called by the generic read/write routines to perform |
683 | direct_IO - that is IO requests which bypass the page cache | 689 | direct_IO - that is IO requests which bypass the page cache |
684 | and transfer data directly between the storage and the | 690 | and transfer data directly between the storage and the |