Skip to content

Commit

Permalink
orangefs: Remove test for folio error
Browse files Browse the repository at this point in the history
The page cache clears the error bit before calling ->read_folio(),
so this condition could never have been true.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
  • Loading branch information
Matthew Wilcox (Oracle) committed Jun 29, 2022
1 parent ba98631 commit 9329883
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/orangefs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,14 @@ static int orangefs_read_folio(struct file *file, struct folio *folio)

ret = wait_for_direct_io(ORANGEFS_IO_READ, inode, &off, &iter,
folio_size(folio), inode->i_size, NULL, NULL, file);
/* this will only zero remaining unread portions of the page data */
/* this will only zero remaining unread portions of the folio data */
iov_iter_zero(~0U, &iter);
/* takes care of potential aliasing */
flush_dcache_folio(folio);
if (ret < 0) {
folio_set_error(folio);
} else {
folio_mark_uptodate(folio);
if (folio_test_error(folio))
folio_clear_error(folio);
ret = 0;
}
/* unlock the folio after the ->read_folio() routine completes */
Expand Down

0 comments on commit 9329883

Please sign in to comment.