Commit aaafa1eb authored by Naohiro Aota's avatar Naohiro Aota Committed by David Sterba
Browse files

btrfs: replace unnecessary goto with direct return at cow_file_range()



The 'goto out' in cow_file_range() in the exit block are not necessary
and jump back. Replace them with return, while still keeping 'goto out'
in the main code.

Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
[ keep goto in the main code, update changelog ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 71aa147b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1413,7 +1413,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
					     page_ops);
		start += cur_alloc_size;
		if (start >= end)
			goto out;
			return ret;
	}

	/*
@@ -1425,7 +1425,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
	extent_clear_unlock_delalloc(inode, start, end, locked_page,
				     clear_bits | EXTENT_CLEAR_DATA_RESV,
				     page_ops);
	goto out;
	return ret;
}

/*