Skip to content

Commit

Permalink
squashfs: remove calls to set the folio error flag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox (Oracle) authored and Andrew Morton committed May 8, 2024
1 parent 675f02e commit bbf45b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions fs/squashfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@ void squashfs_fill_page(struct page *page, struct squashfs_cache_entry *buffer,
flush_dcache_page(page);
if (copied == avail)
SetPageUptodate(page);
else
SetPageError(page);
}

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

res = read_blocklist(inode, index, &block);
if (res < 0)
goto error_out;
goto out;

if (res == 0)
res = squashfs_readpage_sparse(page, expected);
Expand All @@ -483,8 +481,6 @@ static int squashfs_read_folio(struct file *file, struct folio *folio)
if (!res)
return 0;

error_out:
SetPageError(page);
out:
pageaddr = kmap_atomic(page);
memset(pageaddr, 0, PAGE_SIZE);
Expand Down
3 changes: 1 addition & 2 deletions fs/squashfs/file_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,13 @@ int squashfs_readpage_block(struct page *target_page, u64 block, int bsize,
return 0;

mark_errored:
/* Decompression failed, mark pages as errored. Target_page is
/* Decompression failed. Target_page is
* dealt with by the caller
*/
for (i = 0; i < pages; i++) {
if (page[i] == NULL || page[i] == target_page)
continue;
flush_dcache_page(page[i]);
SetPageError(page[i]);
unlock_page(page[i]);
put_page(page[i]);
}
Expand Down

0 comments on commit bbf45b7

Please sign in to comment.