bcachefs: Don't allocate new memory when mempool is exhausted
authorAlan Huang <mmpgouride@gmail.com>
Fri, 13 Jun 2025 13:19:50 +0000 (21:19 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 16 Jun 2025 02:11:55 +0000 (22:11 -0400)
commit9b9a3270092bf8030dbe21ce90b2d0c8d98d33c7
tree9ab48fe018724f6af424abff1382ec8d713171bb
parent3bd6f8aeae3d3f8121cbae5a8650a46622aa4e07
bcachefs: Don't allocate new memory when mempool is exhausted

Allocating new memory when mempool is exhausted is too complicated, just
return ENOMEM is fine. memcpy is not needed, since there might be
pointers point to the old memory, that's the bug.

Signed-off-by: Alan Huang <mmpgouride@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.c