diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-02-17 18:51:16 +0000 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-02-28 11:21:31 +0100 |
commit | ad49fe2b3d54fe657756e1dbf0acb5ed9cf5c576 (patch) | |
tree | cf4d0c6f231222dfeef2eea25f404c55e313ec97 /fs/ceph | |
parent | a55cf4fd8faea83dbb1ac7a3cb708193e33aa7a1 (diff) |
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index c1755799e335..13f4fdd9a8ba 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1236,11 +1236,9 @@ bool is_write_congestion_happened(struct ceph_fs_client *fsc) CONGESTION_ON_THRESH(fsc->mount_options->congestion_kb); } -static inline -int ceph_move_dirty_page_in_page_array(struct address_space *mapping, - struct writeback_control *wbc, - struct ceph_writeback_ctl *ceph_wbc, - struct page *page) +static inline int move_dirty_folio_in_page_array(struct address_space *mapping, + struct writeback_control *wbc, + struct ceph_writeback_ctl *ceph_wbc, struct folio *folio) { struct inode *inode = mapping->host; 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, gfp_t gfp_flags = ceph_wbc->locked_pages ? GFP_NOWAIT : GFP_NOFS; if (IS_ENCRYPTED(inode)) { - pages[index] = fscrypt_encrypt_pagecache_blocks(page, + pages[index] = fscrypt_encrypt_pagecache_blocks(&folio->page, PAGE_SIZE, 0, gfp_flags); @@ -1267,7 +1265,7 @@ int ceph_move_dirty_page_in_page_array(struct address_space *mapping, return PTR_ERR(pages[index]); } } else { - pages[index] = page; + pages[index] = &folio->page; } ceph_wbc->locked_pages++; @@ -1359,8 +1357,8 @@ int ceph_process_folio_batch(struct address_space *mapping, fsc->write_congested = is_write_congestion_happened(fsc); - rc = ceph_move_dirty_page_in_page_array(mapping, wbc, - ceph_wbc, &folio->page); + rc = move_dirty_folio_in_page_array(mapping, wbc, ceph_wbc, + folio); if (rc) { folio_redirty_for_writepage(wbc, folio); folio_unlock(folio); |