Skip to contentSkip to conversation

btrfs: raid56: Remove out label in __raid56_parity_recover

PATCH RESEND In review Nikolay Borisov 2 participants 2 messages Jul 15, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 btrfs: raid56: Remove out label in __raid56_parity_recover

There's no cleanup that occurs so we can simply return 0 directly.

---
 fs/btrfs/raid56.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/raid56.c +2 -2
index 61ff77392357..255490f42b5d 100644
@@ -2083,7 +2083,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
 		 */
 		if (atomic_read(&rbio->error) <= rbio->bbio->max_errors) {
 			__raid_recover_end_io(rbio);
-			goto out;
+			return 0;
 		} else {
 			goto cleanup;
 		}
@@ -2103,7 +2103,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
 
 		submit_bio(bio);
 	}
-out:
+
 	return 0;
 
 cleanup:

--
2.17.1

#1 lore raw
Quoted 3 lines · Nikolay Borisov

There's no cleanup that occurs so we can simply return 0 directly.

Added to misc-next, thanks.

fs/btrfs/raid56.c static int __raid56_parity_recover(struct btrfs_raid_bio *rbio) · line 2086

Quoted 6 lines
fs/btrfs/raid56.c +1 -1
@@ -2083,7 +2083,7 @@ static int __raid56_parity_recover(struct btrfs_raid_bio *rbio)
 		 */
 		if (atomic_read(&rbio->error) <= rbio->bbio->max_errors) {
 			__raid_recover_end_io(rbio);
-			goto out;
+			return 0;

The rest of the function can be seen from that point so readability is not hurt.