aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/delayed-inode.c
diff options
context:
space:
mode:
authorBoris Burkov <[email protected]>2024-03-21 17:14:24 +0000
committerDavid Sterba <[email protected]>2024-04-02 17:18:33 +0000
commit71537e35c324ea6fbd68377a4f26bb93a831ae35 (patch)
tree97f44aacc0f3438279f7a511c8ba2786b8a9c001 /fs/btrfs/delayed-inode.c
parentbtrfs: qgroup: fix qgroup prealloc rsv leak in subvolume operations (diff)
downloadkernel-71537e35c324ea6fbd68377a4f26bb93a831ae35.tar.gz
kernel-71537e35c324ea6fbd68377a4f26bb93a831ae35.zip
btrfs: record delayed inode root in transaction
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: [email protected] # 6.1+ Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Boris Burkov <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
-rw-r--r--fs/btrfs/delayed-inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index dd6f566a383f..121ab890bd05 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -1133,6 +1133,9 @@ __btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans,
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;
}