Skip to content

Commit 14ff8e1

Browse files
committed
btrfs: no need to run delayed refs after commit_fs_roots during commit
The inode number cache has been removed in this dev cycle, there's one more leftover. We don't need to run the delayed refs again after commit_fs_roots as stated in the comment, because btrfs_save_ino_cache is no more since 5297199 ("btrfs: remove inode number cache feature"). Nothing else between commit_fs_roots and btrfs_qgroup_account_extents could create new delayed refs so the qgroup consistency should be safe. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e076ab2 commit 14ff8e1

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

fs/btrfs/transaction.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,14 +2264,6 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
22642264
*/
22652265
btrfs_free_log_root_tree(trans, fs_info);
22662266

2267-
/*
2268-
* commit_fs_roots() can call btrfs_save_ino_cache(), which generates
2269-
* new delayed refs. Must handle them or qgroup can be wrong.
2270-
*/
2271-
ret = btrfs_run_delayed_refs(trans, (unsigned long)-1);
2272-
if (ret)
2273-
goto unlock_tree_log;
2274-
22752267
/*
22762268
* Since fs roots are all committed, we can get a quite accurate
22772269
* new_roots. So let's do quota accounting.

0 commit comments

Comments
 (0)