diff options
| author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2025-07-22 13:39:11 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-09-22 10:54:30 +0200 |
| commit | 3c44cd3c79fcb38a86836dea6ff8fec322a9e68c (patch) | |
| tree | 1625524004013fe7681baf0543c537a248de9254 /fs/btrfs/inode.c | |
| parent | 3d16abf6c88ae20cc4168756e77ad270a9b37182 (diff) | |
btrfs: zoned: return error from btrfs_zone_finish_endio()
Now that btrfs_zone_finish_endio_workfn() is directly calling
do_zone_finish() the only caller of btrfs_zone_finish_endio() is
btrfs_finish_one_ordered().
btrfs_finish_one_ordered() already has error handling in-place so
btrfs_zone_finish_endio() can return an error if the block group lookup
fails.
Also as btrfs_zone_finish_endio() already checks for zoned filesystems and
returns early, there's no need to do this in the caller.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
| -rw-r--r-- | fs/btrfs/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 225e9221c456..9eb0253507a0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3109,9 +3109,10 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent) goto out; } - if (btrfs_is_zoned(fs_info)) - btrfs_zone_finish_endio(fs_info, ordered_extent->disk_bytenr, - ordered_extent->disk_num_bytes); + ret = btrfs_zone_finish_endio(fs_info, ordered_extent->disk_bytenr, + ordered_extent->disk_num_bytes); + if (ret) + goto out; if (test_bit(BTRFS_ORDERED_TRUNCATED, &ordered_extent->flags)) { truncated = true; |