summaryrefslogtreecommitdiff
path: root/fs/btrfs/bio.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-24 18:03:05 +0300
committerDavid Sterba <dsterba@suse.com>2023-06-19 14:59:32 +0300
commite9cb93b9fbd0bfcef2774e82d095362ad16acf6e (patch)
tree4556cba593f98191e39421ef2338a7cd35bc46c0 /fs/btrfs/bio.c
parentdd8b7b0416704efb0dcd74801a1a48aa221f1cf5 (diff)
downloadlinux-e9cb93b9fbd0bfcef2774e82d095362ad16acf6e.tar.xz
btrfs: don't call btrfs_record_physical_zoned for failed append
When a zoned append command fails there is no written address reported, so don't try to record it. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/bio.c')
-rw-r--r--fs/btrfs/bio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 2e2e1abd5838..ea6c81f9d1a3 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -348,7 +348,7 @@ static void btrfs_simple_end_io(struct bio *bio)
INIT_WORK(&bbio->end_io_work, btrfs_end_bio_work);
queue_work(btrfs_end_io_wq(fs_info, bio), &bbio->end_io_work);
} else {
- if (bio_op(bio) == REQ_OP_ZONE_APPEND)
+ if (bio_op(bio) == REQ_OP_ZONE_APPEND && !bio->bi_status)
btrfs_record_physical_zoned(bbio);
btrfs_orig_bbio_end_io(bbio);
}