filemap: Handle error return from __filemap_get_folio()
authorMatthew Wilcox <willy@infradead.org>
Sat, 6 May 2023 16:04:14 +0000 (17:04 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 May 2023 17:08:59 +0000 (10:08 -0700)
commit38a55db9877cae9aa9cc53bb0464b7434fb03e75
tree7b6d36572ba14afcc0b72424c50b69f0f2f8b4b6
parentdd9e11d6477a52ede9ebe575c83285e79e823889
filemap: Handle error return from __filemap_get_folio()

Smatch reports that filemap_fault() was missed in the conversion of
__filemap_get_folio() error returns from NULL to ERR_PTR.

Fixes: 66dabbb65d67 ("mm: return an ERR_PTR from __filemap_get_folio")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reported-by: syzbot+48011b86c8ea329af1b9@syzkaller.appspotmail.com
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c