Skip to content

Commit 71537e3

Browse files
boryaskdave
authored andcommitted
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: 4f5427c ("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]>
1 parent 74e9795 commit 71537e3

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
@@ -1133,6 +1133,9 @@ __btrfs_commit_inode_delayed_items(struct btrfs_trans_handle *trans,
11331133
if (ret)
11341134
return ret;
11351135

1136+
ret = btrfs_record_root_in_trans(trans, node->root);
1137+
if (ret)
1138+
return ret;
11361139
ret = btrfs_update_delayed_inode(trans, node->root, path, node);
11371140
return ret;
11381141
}

0 commit comments

Comments
 (0)