On Mon, Jun 05, 2023 at 05:50:28PM +0100, Matthew Wilcox (Oracle) wrote: > Convert from the old page APIs to the new folio APIs which saves > a few hidden calls to compound_head(). Argh. This fix was supposed to be folded in. diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1b2055d5ec5f..67cf5138ccc4 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1161,7 +1161,7 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode, struct folio *folio; folio = filemap_lock_folio(inode->i_mapping, index); - if (folio) { + if (!IS_ERR(folio)) { if (folio_test_dirty(folio)) { /* * 'ubifs_jnl_truncate()' will try to truncate