summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/io_write.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-28 16:30:45 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 11:47:39 -0500
commita276132c2d2bc4baaa9bcfd86419885bd9b8567e (patch)
treea88abc066dbd4ba5b037e68c9d81cfd8947fe7c8 /fs/bcachefs/io_write.c
parent3398124444b90079a09374ab10444cd937b72ae1 (diff)
downloadlinux-a276132c2d2bc4baaa9bcfd86419885bd9b8567e.tar.gz
linux-a276132c2d2bc4baaa9bcfd86419885bd9b8567e.tar.bz2
linux-a276132c2d2bc4baaa9bcfd86419885bd9b8567e.zip
bcachefs: Don't open code bch2_dev_exists2()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_write.c')
-rw-r--r--fs/bcachefs/io_write.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c
index 1dad2a351b71..264d8fcef176 100644
--- a/fs/bcachefs/io_write.c
+++ b/fs/bcachefs/io_write.c
@@ -403,8 +403,7 @@ void bch2_submit_wbio_replicas(struct bch_write_bio *wbio, struct bch_fs *c,
BUG_ON(c->opts.nochanges);
bkey_for_each_ptr(ptrs, ptr) {
- BUG_ON(ptr->dev >= BCH_SB_MEMBERS_MAX ||
- !c->devs[ptr->dev]);
+ BUG_ON(!bch2_dev_exists2(c, ptr->dev));
ca = bch_dev_bkey_exists(c, ptr->dev);