On Fri, Nov 29, 2024 at 11:42:44PM +0800, kernel test robot wrote: > >> fs/ceph/addr.c:1178:39: warning: variable 'page' is uninitialized when used here [-Wuninitialized] > 1178 | fscrypt_encrypt_pagecache_blocks(page, This will fix the bug. I'll send a v2 with this folded in. diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 1e0c982f5abe..b065b971a9f0 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1040,7 +1040,7 @@ static int ceph_writepages_start(struct address_space *mapping, int num_ops = 0, op_idx; unsigned i, nr_folios, max_pages, locked_pages = 0; struct page **pages = NULL, **data_pages; - struct page *page; + struct folio *folio; pgoff_t strip_unit_end = 0; u64 offset = 0, len = 0; bool from_pool = false; @@ -1054,7 +1054,7 @@ static int ceph_writepages_start(struct address_space *mapping, if (!nr_folios && !locked_pages) break; for (i = 0; i < nr_folios && locked_pages < max_pages; i++) { - struct folio *folio = fbatch.folios[i]; + folio = fbatch.folios[i]; doutc(cl, "? %p idx %lu\n", folio, folio->index); if (locked_pages == 0) @@ -1175,7 +1175,7 @@ static int ceph_writepages_start(struct address_space *mapping, if (IS_ENCRYPTED(inode)) { pages[locked_pages] = - fscrypt_encrypt_pagecache_blocks(page, + fscrypt_encrypt_pagecache_blocks(&folio->page, PAGE_SIZE, 0, locked_pages ? GFP_NOWAIT : GFP_NOFS); if (IS_ERR(pages[locked_pages])) { @@ -1303,7 +1303,7 @@ static int ceph_writepages_start(struct address_space *mapping, /* writepages_finish() clears writeback pages * according to the data length, so make sure * data length covers all locked pages */ - u64 min_len = len + 1 - thp_size(page); + u64 min_len = len + 1 - folio_size(folio); len = get_writepages_data_length(inode, pages[i - 1], offset); len = max(len, min_len);