]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove the dead comment in writepage_delalloc()
authorQu Wenruo <wqu@suse.com>
Wed, 28 Jul 2021 06:05:05 +0000 (14:05 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:08 +0000 (13:19 +0200)
commitd0210195d8d9ddaa10f00aaa88272cc7a2a3af90
tree30edcdb7862426045b675ebdc554682029e10ecc
parent85bfbe3f2cf87a580894027f93b290a8a3b01c23
btrfs: remove the dead comment in writepage_delalloc()

When btrfs_run_delalloc_range() failed, we will error out.

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

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

Furthermore, even if that comment was right (which is not), we would
return -EIO if the IO had 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 <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/inode.c