Skip to content

Commit bbf45b7

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
squashfs: remove calls to set the folio error flag
Nobody checks the error flag on squashfs folios, so stop setting it. Link: https://lkml.kernel.org/r/20240420025029.2166544-24-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Tested-by: Phillip Lougher <phillip@squashfs.org.uk> Reviewed-by: Phillip Lougher <phillip@squashfs.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 675f02e commit bbf45b7

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

fs/squashfs/file.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,6 @@ void squashfs_fill_page(struct page *page, struct squashfs_cache_entry *buffer,
375375
flush_dcache_page(page);
376376
if (copied == avail)
377377
SetPageUptodate(page);
378-
else
379-
SetPageError(page);
380378
}
381379

382380
/* Copy data into page cache */
@@ -471,7 +469,7 @@ static int squashfs_read_folio(struct file *file, struct folio *folio)
471469

472470
res = read_blocklist(inode, index, &block);
473471
if (res < 0)
474-
goto error_out;
472+
goto out;
475473

476474
if (res == 0)
477475
res = squashfs_readpage_sparse(page, expected);
@@ -483,8 +481,6 @@ static int squashfs_read_folio(struct file *file, struct folio *folio)
483481
if (!res)
484482
return 0;
485483

486-
error_out:
487-
SetPageError(page);
488484
out:
489485
pageaddr = kmap_atomic(page);
490486
memset(pageaddr, 0, PAGE_SIZE);

fs/squashfs/file_direct.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,13 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize,
106106
return 0;
107107

108108
mark_errored:
109-
/* Decompression failed, mark pages as errored. Target_page is
109+
/* Decompression failed. Target_page is
110110
* dealt with by the caller
111111
*/
112112
for (i = 0; i < pages; i++) {
113113
if (page[i] == NULL || page[i] == target_page)
114114
continue;
115115
flush_dcache_page(page[i]);
116-
SetPageError(page[i]);
117116
unlock_page(page[i]);
118117
put_page(page[i]);
119118
}

0 commit comments

Comments
 (0)