Skip to content

Commit aa5dc8c

Browse files
author
Matthew Wilcox (Oracle)
committed
nfs: Convert to free_folio
Add a wrapper that converts back from the folio to the page. This entire file needs to be converted to use folios, but that's a task for a different set of patches. Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
1 parent c78ac80 commit aa5dc8c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

fs/nfs/dir.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static int nfs_closedir(struct inode *, struct file *);
5555
static int nfs_readdir(struct file *, struct dir_context *);
5656
static int nfs_fsync_dir(struct file *, loff_t, loff_t, int);
5757
static loff_t nfs_llseek_dir(struct file *, loff_t, int);
58-
static void nfs_readdir_clear_array(struct page*);
58+
static void nfs_readdir_free_folio(struct folio *);
5959

6060
const struct file_operations nfs_dir_operations = {
6161
.llseek = nfs_llseek_dir,
@@ -67,7 +67,7 @@ const struct file_operations nfs_dir_operations = {
6767
};
6868

6969
const struct address_space_operations nfs_dir_aops = {
70-
.freepage = nfs_readdir_clear_array,
70+
.free_folio = nfs_readdir_free_folio,
7171
};
7272

7373
#define NFS_INIT_DTSIZE PAGE_SIZE
@@ -228,6 +228,11 @@ static void nfs_readdir_clear_array(struct page *page)
228228
kunmap_atomic(array);
229229
}
230230

231+
static void nfs_readdir_free_folio(struct folio *folio)
232+
{
233+
nfs_readdir_clear_array(&folio->page);
234+
}
235+
231236
static void nfs_readdir_page_reinit_array(struct page *page, u64 last_cookie,
232237
u64 change_attr)
233238
{

0 commit comments

Comments
 (0)