Skip to content

Commit 14b74fc

Browse files
boryasgregkh
authored andcommitted
btrfs: record delayed inode root in transaction
[ Upstream commit 71537e3 ] 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: 4f5427c ("btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Boris Burkov <boris@bur.io> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent b282473 commit 14b74fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/btrfs/delayed-inode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,9 @@ __btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans,
11371137
if (ret)
11381138
return ret;
11391139

1140+
ret = btrfs_record_root_in_trans(trans, node->root);
1141+
if (ret)
1142+
return ret;
11401143
ret = btrfs_update_delayed_inode(trans, node->root, path, node);
11411144
return ret;
11421145
}

0 commit comments

Comments
 (0)