Skip to content

Commit ad49fe2

Browse files
Matthew Wilcox (Oracle)brauner
authored andcommitted
ceph: Convert ceph_move_dirty_page_in_page_array() to move_dirty_folio_in_page_array()
Shorten the name of this internal function by dropping the 'ceph_' prefix and pass in a folio instead of a page. Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org> Link: https://lore.kernel.org/r/20250217185119.430193-9-willy@infradead.org Tested-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent a55cf4f commit ad49fe2

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

fs/ceph/addr.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,11 +1236,9 @@ bool is_write_congestion_happened(struct ceph_fs_client *fsc)
12361236
CONGESTION_ON_THRESH(fsc->mount_options->congestion_kb);
12371237
}
12381238

1239-
static inline
1240-
int ceph_move_dirty_page_in_page_array(struct address_space *mapping,
1241-
struct writeback_control *wbc,
1242-
struct ceph_writeback_ctl *ceph_wbc,
1243-
struct page *page)
1239+
static inline int move_dirty_folio_in_page_array(struct address_space *mapping,
1240+
struct writeback_control *wbc,
1241+
struct ceph_writeback_ctl *ceph_wbc, struct folio *folio)
12441242
{
12451243
struct inode *inode = mapping->host;
12461244
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
@@ -1250,7 +1248,7 @@ int ceph_move_dirty_page_in_page_array(struct address_space *mapping,
12501248
gfp_t gfp_flags = ceph_wbc->locked_pages ? GFP_NOWAIT : GFP_NOFS;
12511249

12521250
if (IS_ENCRYPTED(inode)) {
1253-
pages[index] = fscrypt_encrypt_pagecache_blocks(page,
1251+
pages[index] = fscrypt_encrypt_pagecache_blocks(&folio->page,
12541252
PAGE_SIZE,
12551253
0,
12561254
gfp_flags);
@@ -1267,7 +1265,7 @@ int ceph_move_dirty_page_in_page_array(struct address_space *mapping,
12671265
return PTR_ERR(pages[index]);
12681266
}
12691267
} else {
1270-
pages[index] = page;
1268+
pages[index] = &folio->page;
12711269
}
12721270

12731271
ceph_wbc->locked_pages++;
@@ -1359,8 +1357,8 @@ int ceph_process_folio_batch(struct address_space *mapping,
13591357

13601358
fsc->write_congested = is_write_congestion_happened(fsc);
13611359

1362-
rc = ceph_move_dirty_page_in_page_array(mapping, wbc,
1363-
ceph_wbc, &folio->page);
1360+
rc = move_dirty_folio_in_page_array(mapping, wbc, ceph_wbc,
1361+
folio);
13641362
if (rc) {
13651363
folio_redirty_for_writepage(wbc, folio);
13661364
folio_unlock(folio);

0 commit comments

Comments
 (0)