From: Kent Overstreet Date: Sun, 5 Mar 2023 08:11:00 +0000 (-0500) Subject: bcachefs: Free move buffers as early as possible X-Git-Tag: io_uring-6.7-2023-11-10~119^2~448 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0b943b973c67c2780cb991c3011ad3279f670fa4;p=linux-block.git bcachefs: Free move buffers as early as possible Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index a7e09772895e..393629e52d03 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -834,6 +834,10 @@ static void bch2_write_index(struct closure *cl) struct write_point *wp = op->wp; struct workqueue_struct *wq = index_update_wq(op); + if ((op->flags & BCH_WRITE_DONE) && + (op->flags & BCH_WRITE_MOVE)) + bch2_bio_free_pages_pool(op->c, &op->wbio.bio); + barrier(); /*