Thread (2 messages) 2 messages, 2 authors, 2021-07-28

Re: [PATCH] btrfs: remove the dead comment in writepage_delalloc()

From: David Sterba <hidden>
Date: 2021-07-28 12:50:16

On Wed, Jul 28, 2021 at 02:05:05PM +0800, Qu Wenruo wrote:
When btrfs_run_delalloc_range() failed, we will error out.

But there is a strange comment mentioning that
btrfs_run_delalloc_range() could have return value >0 to indicate the IO
has already started.

Commit 40f765805f08 ("Btrfs: split up __extent_writepage to lower stack
usage") introduced the comment, but unfortunately at that time, we are
already using @page_started to indicate that case, and still return 0.

Furthermore, even if that comment is right (which is not), we would
return -EIO if the IO is already started.

By all means the comment is incorrect, just remove the comment along
with the dead check.

Just to be extra safe, add an ASSERT() in btrfs_run_delalloc_range() to
make sure we either return 0 or error, no positive return value.

Signed-off-by: Qu Wenruo <redacted>
Added to misc-next, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help