From: Naohiro Aota Date: Tue, 21 Jun 2022 06:41:02 +0000 (+0900) Subject: btrfs: replace unnecessary goto with direct return at cow_file_range() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=aaafa1ebd6dbbe57d8b7587815b12e647b8b7b4a;p=linux.git 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: Filipe Manana Signed-off-by: Naohiro Aota Reviewed-by: David Sterba [ keep goto in the main code, update changelog ] Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 90b1c1df09432..fae0e8457edd4 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1413,7 +1413,7 @@ out_unlock: page_ops); start += cur_alloc_size; if (start >= end) - goto out; + return ret; } /* @@ -1425,7 +1425,7 @@ out_unlock: extent_clear_unlock_delalloc(inode, start, end, locked_page, clear_bits | EXTENT_CLEAR_DATA_RESV, page_ops); - goto out; + return ret; } /*