Commit 169d2c87 authored by Omar Sandoval's avatar Omar Sandoval Committed by David Sterba

btrfs: remove trivial goto label in __extent_writepage()

Since 40f76580 ("Btrfs: split up __extent_writepage to lower stack
usage"), done_unlocked is simply a return 0. Get rid of it.
Mid-statement block returns don seem to make the code less readable here.
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent eb70d222
...@@ -3596,7 +3596,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ...@@ -3596,7 +3596,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
if (!epd->extent_locked) { if (!epd->extent_locked) {
ret = writepage_delalloc(inode, page, wbc, start, &nr_written); ret = writepage_delalloc(inode, page, wbc, start, &nr_written);
if (ret == 1) if (ret == 1)
goto done_unlocked; return 0;
if (ret) if (ret)
goto done; goto done;
} }
...@@ -3604,7 +3604,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ...@@ -3604,7 +3604,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
ret = __extent_writepage_io(inode, page, wbc, epd, ret = __extent_writepage_io(inode, page, wbc, epd,
i_size, nr_written, &nr); i_size, nr_written, &nr);
if (ret == 1) if (ret == 1)
goto done_unlocked; return 0;
done: done:
if (nr == 0) { if (nr == 0) {
...@@ -3619,9 +3619,6 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ...@@ -3619,9 +3619,6 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
unlock_page(page); unlock_page(page);
ASSERT(ret <= 0); ASSERT(ret <= 0);
return ret; return ret;
done_unlocked:
return 0;
} }
void wait_on_extent_buffer_writeback(struct extent_buffer *eb) void wait_on_extent_buffer_writeback(struct extent_buffer *eb)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment