mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 14:48:06 +00:00
btrfs: simplify compressed/inline check in __extent_writepage_io()
Commit 7087a9d8db
("btrfs: Remove
extent_io_ops::writepage_end_io_hook") left this logic in a confusing
state. Simplify it.
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
39b07b5d70
commit
c8b04030c5
1 changed files with 4 additions and 15 deletions
|
@ -3492,22 +3492,11 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
|
||||||
*/
|
*/
|
||||||
if (compressed || block_start == EXTENT_MAP_HOLE ||
|
if (compressed || block_start == EXTENT_MAP_HOLE ||
|
||||||
block_start == EXTENT_MAP_INLINE) {
|
block_start == EXTENT_MAP_INLINE) {
|
||||||
/*
|
if (compressed)
|
||||||
* end_io notification does not happen here for
|
|
||||||
* compressed extents
|
|
||||||
*/
|
|
||||||
if (!compressed)
|
|
||||||
btrfs_writepage_endio_finish_ordered(page, cur,
|
|
||||||
cur + iosize - 1,
|
|
||||||
1);
|
|
||||||
else if (compressed) {
|
|
||||||
/* we don't want to end_page_writeback on
|
|
||||||
* a compressed extent. this happens
|
|
||||||
* elsewhere
|
|
||||||
*/
|
|
||||||
nr++;
|
nr++;
|
||||||
}
|
else
|
||||||
|
btrfs_writepage_endio_finish_ordered(page, cur,
|
||||||
|
cur + iosize - 1, 1);
|
||||||
cur += iosize;
|
cur += iosize;
|
||||||
pg_offset += iosize;
|
pg_offset += iosize;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue