Skip to content

Commit 485053b

Browse files
author
Al Viro
committed
fix ufs_get_locked_folio() breakage
filemap_lock_folio() returns ERR_PTR(-ENOENT) if the thing is not in cache - not NULL like find_lock_page() used to. Fixes: 5fb7bd5 "ufs: add ufs_get_locked_folio and ufs_put_locked_folio" Signed-off-by: Al Viro <[email protected]>
1 parent b85ea95 commit 485053b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ufs/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ struct folio *ufs_get_locked_folio(struct address_space *mapping,
245245
{
246246
struct inode *inode = mapping->host;
247247
struct folio *folio = filemap_lock_folio(mapping, index);
248-
if (!folio) {
248+
if (IS_ERR(folio)) {
249249
folio = read_mapping_folio(mapping, index, NULL);
250250

251251
if (IS_ERR(folio)) {

0 commit comments

Comments
 (0)