summaryrefslogtreecommitdiff
path: root/Documentation/filesystems/locking.rst
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-30 00:00:05 +0300
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-10 06:12:30 +0300
commitfa29000b6b2603ec2bfdc4c73249fcb00cd54f85 (patch)
tree8746e20bb5db7e12c4386098a0b3591c43160575 /Documentation/filesystems/locking.rst
parent07950008692bf22074020e927e95655cd48fdcda (diff)
downloadlinux-fa29000b6b2603ec2bfdc4c73249fcb00cd54f85.tar.xz
fs: Add aops->release_folio
This replaces aops->releasepage. Update the documentation, and call it if it exists. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'Documentation/filesystems/locking.rst')
-rw-r--r--Documentation/filesystems/locking.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/Documentation/filesystems/locking.rst b/Documentation/filesystems/locking.rst
index aeba2475a53c..ddef4a753e73 100644
--- a/Documentation/filesystems/locking.rst
+++ b/Documentation/filesystems/locking.rst
@@ -249,7 +249,7 @@ 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);
- int (*releasepage) (struct page *, int);
+ bool (*release_folio)(struct folio *, gfp_t);
void (*freepage)(struct page *);
int (*direct_IO)(struct kiocb *, struct iov_iter *iter);
bool (*isolate_page) (struct page *, isolate_mode_t);
@@ -270,13 +270,13 @@ ops PageLocked(page) i_rwsem invalidate_lock
writepage: yes, unlocks (see below)
read_folio: yes, unlocks shared
writepages:
-dirty_folio maybe
+dirty_folio: maybe
readahead: yes, unlocks shared
write_begin: locks the page exclusive
write_end: yes, unlocks exclusive
bmap:
invalidate_folio: yes exclusive
-releasepage: yes
+release_folio: yes
freepage: yes
direct_IO:
isolate_page: yes
@@ -372,10 +372,10 @@ invalidate_lock before invalidating page cache in truncate / hole punch
path (and thus calling into ->invalidate_folio) to block races between page
cache invalidation and page cache filling functions (fault, read, ...).
-->releasepage() is called when the kernel is about to try to drop the
-buffers from the page in preparation for freeing it. It returns zero to
-indicate that the buffers are (or may be) freeable. If ->releasepage is zero,
-the kernel assumes that the fs has no private interest in the buffers.
+->release_folio() is called when the kernel is about to try to drop the
+buffers from the folio in preparation for freeing it. It returns false to
+indicate that the buffers are (or may be) freeable. If ->release_folio is
+NULL, the kernel assumes that the fs has no private interest in the buffers.
->freepage() is called when the kernel is done dropping the page
from the page cache.