diff options
| author | David Howells <dhowells@redhat.com> | 2024-12-16 23:40:53 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2024-12-21 00:34:02 +0300 |
| commit | eb1181594417dafad0f75808ead71f6d5170c1ea (patch) | |
| tree | 33d61af51d564764c773069d58c1e9e5a9e9c610 /include/linux | |
| parent | 2a8a384621c35849bbc068e25e41cbe23243fa40 (diff) | |
| download | linux-eb1181594417dafad0f75808ead71f6d5170c1ea.tar.xz | |
netfs: Use a folio_queue allocation and free functions
Provide and use folio_queue allocation and free functions to combine the
allocation, initialisation and stat (un)accounting steps that are repeated
in several places.
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20241216204124.3752367-4-dhowells@redhat.com
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/netfs.h b/include/linux/netfs.h index ecdd5ced16a8..c69e0f02c30f 100644 --- a/include/linux/netfs.h +++ b/include/linux/netfs.h @@ -21,6 +21,7 @@ enum netfs_sreq_ref_trace; typedef struct mempool_s mempool_t; +struct folio_queue; /** * folio_start_private_2 - Start an fscache write on a folio. [DEPRECATED] @@ -453,6 +454,10 @@ void netfs_end_io_write(struct inode *inode); int netfs_start_io_direct(struct inode *inode); void netfs_end_io_direct(struct inode *inode); +/* Miscellaneous APIs. */ +struct folio_queue *netfs_folioq_alloc(gfp_t gfp); +void netfs_folioq_free(struct folio_queue *folioq); + /** * netfs_inode - Get the netfs inode context from the inode * @inode: The inode to query |
