]> www.infradead.org Git - nvme.git/commit
hostfs: Fix the NULL vs IS_ERR() bug for __filemap_get_folio()
authorZhangPeng <zhangpeng362@huawei.com>
Mon, 4 Nov 2024 12:34:40 +0000 (20:34 +0800)
committerRichard Weinberger <richard@nod.at>
Fri, 15 Nov 2024 19:55:32 +0000 (20:55 +0100)
commitbed2cc482600296fe04edbc38005ba2851449c10
tree19798268ec9b74145a4e0f03447404b2ed50db36
parent2f681ba4b352cdd5658ed2a96062375a12839755
hostfs: Fix the NULL vs IS_ERR() bug for __filemap_get_folio()

The __filemap_get_folio() function returns error pointers.
It never returns NULL. So use IS_ERR() to check it.

Fixes: 1da86618bdce ("fs: Convert aops->write_begin to take a folio")
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/hostfs/hostfs_kern.c