mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
btrfs: handle record_root_in_trans failure in qgroup_account_snapshot
record_root_in_trans can fail currently, so handle this failure properly. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
68075ea8d7
commit
1c442d2246
@ -1454,7 +1454,9 @@ static int qgroup_account_snapshot(struct btrfs_trans_handle *trans,
|
||||
* recorded root will never be updated again, causing an outdated root
|
||||
* item.
|
||||
*/
|
||||
record_root_in_trans(trans, src, 1);
|
||||
ret = record_root_in_trans(trans, src, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* btrfs_qgroup_inherit relies on a consistent view of the usage for the
|
||||
@ -1523,7 +1525,7 @@ out:
|
||||
* insert_dir_item()
|
||||
*/
|
||||
if (!ret)
|
||||
record_root_in_trans(trans, parent, 1);
|
||||
ret = record_root_in_trans(trans, parent, 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user