This is a note to let you know that I've just added the patch titled btrfs: record delayed inode root in transaction to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: btrfs-record-delayed-inode-root-in-transaction.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 71537e35c324ea6fbd68377a4f26bb93a831ae35 Mon Sep 17 00:00:00 2001 From: Boris Burkov <boris@xxxxxx> Date: Thu, 21 Mar 2024 10:14:24 -0700 Subject: btrfs: record delayed inode root in transaction From: Boris Burkov <boris@xxxxxx> commit 71537e35c324ea6fbd68377a4f26bb93a831ae35 upstream. When running delayed inode updates, we do not record the inode's root in the transaction, but we do allocate PREALLOC and thus converted PERTRANS space for it. To be sure we free that PERTRANS meta rsv, we must ensure that we record the root in the transaction. Fixes: 4f5427ccce5d ("btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item") CC: stable@xxxxxxxxxxxxxxx # 6.1+ Reviewed-by: Qu Wenruo <wqu@xxxxxxxx> Signed-off-by: Boris Burkov <boris@xxxxxx> Signed-off-by: David Sterba <dsterba@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/btrfs/delayed-inode.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1115,6 +1115,9 @@ __btrfs_commit_inode_delayed_items(struc if (ret) return ret; + ret = btrfs_record_root_in_trans(trans, node->root); + if (ret) + return ret; ret = btrfs_update_delayed_inode(trans, node->root, path, node); return ret; } Patches currently in stable-queue which might be from boris@xxxxxx are queue-6.1/btrfs-qgroup-convert-prealloc-to-pertrans-after-record_root_in_trans.patch queue-6.1/btrfs-qgroup-correctly-model-root-qgroup-rsv-in-convert.patch queue-6.1/btrfs-record-delayed-inode-root-in-transaction.patch