Skip to content

Commit 37bf771

Browse files
committed
btrfs: handle transaction commit errors in flush_reservations()
Other errors in flush_reservations() are handled and also in the caller. Ignoring commit might make some sense as it's called right after join so it's to poke the whole commit machinery to free space. However for consistency return the error. The caller btrfs_quota_disable() would try to start the transaction which would in turn fail too so there's no effective change. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 06c9564 commit 37bf771

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/btrfs/qgroup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static int flush_reservations(struct btrfs_fs_info *fs_info)
13241324
trans = btrfs_join_transaction(fs_info->tree_root);
13251325
if (IS_ERR(trans))
13261326
return PTR_ERR(trans);
1327-
btrfs_commit_transaction(trans);
1327+
ret = btrfs_commit_transaction(trans);
13281328

13291329
return ret;
13301330
}

0 commit comments

Comments
 (0)