Message ID | 81ea4a6b327f26506041e2e43adc9dfccc7a86fe.1575336816.git.osandov@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: miscellaneous cleanups | expand |
On Mon, Dec 02, 2019 at 05:34:21PM -0800, Omar Sandoval wrote: [...] > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index dad6b06d0a8e..8622282db31e 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -3596,7 +3596,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, > if (!epd->extent_locked) { > ret = writepage_delalloc(inode, page, wbc, start, &nr_written); > if (ret == 1) > - goto done_unlocked; > + return 0; > if (ret) > goto done; Unrelated side note, wouldn't it be more obvious if we do if (ret == 1) return 0; if (ret < 0) goto done; as writepage_delalloc() returns 1, 0, and < 1 Anyways this is not really related to this patch, Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index dad6b06d0a8e..8622282db31e 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3596,7 +3596,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, if (!epd->extent_locked) { ret = writepage_delalloc(inode, page, wbc, start, &nr_written); if (ret == 1) - goto done_unlocked; + return 0; if (ret) goto done; } @@ -3604,7 +3604,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ret = __extent_writepage_io(inode, page, wbc, epd, i_size, nr_written, &nr); if (ret == 1) - goto done_unlocked; + return 0; done: if (nr == 0) { @@ -3619,9 +3619,6 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, unlock_page(page); ASSERT(ret <= 0); return ret; - -done_unlocked: - return 0; } void wait_on_extent_buffer_writeback(struct extent_buffer *eb)