Skip to content

Commit fb6fec6

Browse files
committed
Merge tag 'fs_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull isofs update from Jan Kara: "Partial conversion of isofs to folios" * tag 'fs_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: isofs: Partially convert zisofs_read_folio to use a folio
2 parents 113385c + 5c44aa2 commit fb6fec6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

fs/isofs/compress.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ static int zisofs_fill_pages(struct inode *inode, int full_page, int pcount,
301301
*/
302302
static int zisofs_read_folio(struct file *file, struct folio *folio)
303303
{
304-
struct page *page = &folio->page;
305304
struct inode *inode = file_inode(file);
306305
struct address_space *mapping = inode->i_mapping;
307306
int err;
@@ -311,16 +310,15 @@ static int zisofs_read_folio(struct file *file, struct folio *folio)
311310
PAGE_SHIFT <= zisofs_block_shift ?
312311
(1 << (zisofs_block_shift - PAGE_SHIFT)) : 0;
313312
struct page **pages;
314-
pgoff_t index = page->index, end_index;
313+
pgoff_t index = folio->index, end_index;
315314

316315
end_index = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
317316
/*
318-
* If this page is wholly outside i_size we just return zero;
317+
* If this folio is wholly outside i_size we just return zero;
319318
* do_generic_file_read() will handle this for us
320319
*/
321320
if (index >= end_index) {
322-
SetPageUptodate(page);
323-
unlock_page(page);
321+
folio_end_read(folio, true);
324322
return 0;
325323
}
326324

@@ -338,10 +336,10 @@ static int zisofs_read_folio(struct file *file, struct folio *folio)
338336
pages = kcalloc(max_t(unsigned int, zisofs_pages_per_cblock, 1),
339337
sizeof(*pages), GFP_KERNEL);
340338
if (!pages) {
341-
unlock_page(page);
339+
folio_unlock(folio);
342340
return -ENOMEM;
343341
}
344-
pages[full_page] = page;
342+
pages[full_page] = &folio->page;
345343

346344
for (i = 0; i < pcount; i++, index++) {
347345
if (i != full_page)

0 commit comments

Comments
 (0)