mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
gfs2: Fix a NULL vs IS_ERR() bug in gfs2_find_jhead()
The filemap_grab_folio() function doesn't return NULL, it returns error
pointers. Fix the check to match.
Fixes: 4082976009 ("gfs2: Convert gfs2_find_jhead() to use a folio")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
0776a508d1
commit
951d701ef1
|
|
@ -530,8 +530,8 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head,
|
|||
if (!folio) {
|
||||
folio = filemap_grab_folio(mapping,
|
||||
block >> shift);
|
||||
if (!folio) {
|
||||
ret = -ENOMEM;
|
||||
if (IS_ERR(folio)) {
|
||||
ret = PTR_ERR(folio);
|
||||
done = true;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user