btrfs: merge two superblock writing helpers

write_all_supers and write_ctree_super are almost equal, the parameter
'trans' is unused so we can drop it and have just one helper.

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2017-02-10 19:04:32 +01:00
parent b75f506243
commit eece6a9cf6
4 changed files with 4 additions and 11 deletions

View File

@@ -2257,7 +2257,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans)
goto scrub_continue;
}
ret = write_ctree_super(trans, fs_info, 0);
ret = write_all_supers(fs_info, 0);
if (ret) {
mutex_unlock(&fs_info->tree_log_mutex);
goto scrub_continue;