diff options
author | Linus Torvalds <[email protected]> | 2023-05-09 10:22:13 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2023-05-09 10:22:13 -0700 |
commit | 16a8829130ca22666ac6236178a6233208d425c3 (patch) | |
tree | 577b8738dc672d387575b2b9d9413e4026717960 | |
parent | 1dc3731daf1f350cfd631b5559aac865ab2fbb4c (diff) |
nfs: fix another case of NULL/IS_ERR confusion wrt folio pointers
Dan has been improving on the smatch error pointer checks, and pointed
at another case where the __filemap_get_folio() conversion to error
pointers had been overlooked. This time because it was hidden behind
the filemap_grab_folio() helper function that is a wrapper around it.
Reported-by: Dan Carpenter <[email protected]>
Cc: Anna Schumaker <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | fs/nfs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index bacad0c57810..e63c1d46f189 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -402,7 +402,7 @@ static struct folio *nfs_readdir_folio_get_locked(struct address_space *mapping, struct folio *folio; folio = filemap_grab_folio(mapping, index); - if (!folio) + if (IS_ERR(folio)) return NULL; nfs_readdir_folio_init_and_validate(folio, cookie, change_attr); return folio; |