summaryrefslogtreecommitdiffstats
path: root/fs/remap_range.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-18 05:29:06 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-29 14:51:07 +0200
commitda028b6b648e7f7bcfa52521675980f291b34c2a (patch)
tree5ed62d7b93510184f90d062e7d011261be6f090b /fs/remap_range.c
parentufs: Remove checks for PageError (diff)
downloadlinux-da028b6b648e7f7bcfa52521675980f291b34c2a.tar.xz
linux-da028b6b648e7f7bcfa52521675980f291b34c2a.zip
remap_range: Remove check of uptodate flag
read_mapping_folio() returns an ERR_PTR if the folio is not uptodate, so this check is simply dead code. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs/remap_range.c')
-rw-r--r--fs/remap_range.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/remap_range.c b/fs/remap_range.c
index e112b5424cdb..f1a3795812ce 100644
--- a/fs/remap_range.c
+++ b/fs/remap_range.c
@@ -148,16 +148,7 @@ static int generic_remap_check_len(struct inode *inode_in,
/* Read a page's worth of file data into the page cache. */
static struct folio *vfs_dedupe_get_folio(struct file *file, loff_t pos)
{
- struct folio *folio;
-
- folio = read_mapping_folio(file->f_mapping, pos >> PAGE_SHIFT, file);
- if (IS_ERR(folio))
- return folio;
- if (!folio_test_uptodate(folio)) {
- folio_put(folio);
- return ERR_PTR(-EIO);
- }
- return folio;
+ return read_mapping_folio(file->f_mapping, pos >> PAGE_SHIFT, file);
}
/*