There is no point in having the label since all it does is return the
value in the 'ret' variable. Instead make every goto return directly
and remove the label.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
if (transid) {
if (transid <= btrfs_get_last_trans_committed(fs_info))
- goto out;
+ return 0;
/* find specified transaction */
spin_lock(&fs_info->trans_lock);
if (!cur_trans) {
if (transid > btrfs_get_last_trans_committed(fs_info))
ret = -EINVAL;
- goto out;
+ return ret;
}
} else {
/* find newest transaction that is committing | committed */
}
}
spin_unlock(&fs_info->trans_lock);
+ /* Nothing committing or committed. */
if (!cur_trans)
- goto out; /* nothing committing|committed */
+ return ret;
}
wait_for_commit(cur_trans, TRANS_STATE_COMPLETED);
ret = cur_trans->aborted;
btrfs_put_transaction(cur_trans);
-out:
+
return ret;
}