ocfs2: fix panic in failed foilio allocation
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 ocfs2: fix panic in failed foilio allocation
In commit 7e119cff9d0a, "ocfs2: convert w_pages to w_folios" the chunk page allocations became order 0 folio allocations. If an allocation failed, the folio array entry should be NULL so the error path can skip the entry. In the port it is -ENOMEM and the error path panics trying to free this bad value.
--- fs/ocfs2/aops.c | 1 + 1 file changed, 1 insertion(+)
fs/ocfs2/aops.c +1 -0
@@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct address_space *mapping,if (IS_ERR (wc->w_folios[i])) { ret =PTR_ERR (wc->w_folios[i]);mlog_errno (ret); + wc->w_folios[i] =NULL ; goto out; } }
Signature · 1 line
2.39.5 (Apple Git-154)
PATCH 1/1 ocfs2: fix panic in failed foilio allocation
In reply to a message not in the archiveIn commit 7e119cff9d0a, "ocfs2: convert w_pages to w_folios" the chunk page allocations became order 0 folio allocations. If an allocation failed, the folio array entry should be NULL so the error path can skip the entry. In the port it is -ENOMEM and the error path panics trying to free this bad value.
--- fs/ocfs2/aops.c | 1 + 1 file changed, 1 insertion(+)
fs/ocfs2/aops.c +1 -0
@@ -1071,6 +1071,7 @@ static int ocfs2_grab_folios_for_write(struct address_space *mapping,if (IS_ERR (wc->w_folios[i])) { ret =PTR_ERR (wc->w_folios[i]);mlog_errno (ret); + wc->w_folios[i] =NULL ; goto out; } }
Signature · 1 line
2.39.5 (Apple Git-154)