diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-12-16 23:47:29 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:42 -0500 |
commit | 9fea2274f783a39ba54727571e5e669c947ddd39 (patch) | |
tree | 694b41804df43470bc3ee2ff391ca0e04782061c /fs/bcachefs/chardev.c | |
parent | 80eab7a7c2808f84e56ba1f2f1408a16c46d3bdc (diff) | |
download | linux-stable-9fea2274f783a39ba54727571e5e669c947ddd39.tar.gz linux-stable-9fea2274f783a39ba54727571e5e669c947ddd39.tar.bz2 linux-stable-9fea2274f783a39ba54727571e5e669c947ddd39.zip |
bcachefs: for_each_member_device() now declares loop iter
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/chardev.c')
-rw-r--r-- | fs/bcachefs/chardev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/chardev.c b/fs/bcachefs/chardev.c index 295b1f4e9ece..22a52bc8406b 100644 --- a/fs/bcachefs/chardev.c +++ b/fs/bcachefs/chardev.c @@ -866,8 +866,6 @@ static long bch2_ioctl_disk_get_idx(struct bch_fs *c, struct bch_ioctl_disk_get_idx arg) { dev_t dev = huge_decode_dev(arg.dev); - struct bch_dev *ca; - unsigned i; if (!capable(CAP_SYS_ADMIN)) return -EPERM; @@ -875,10 +873,10 @@ static long bch2_ioctl_disk_get_idx(struct bch_fs *c, if (!dev) return -EINVAL; - for_each_online_member(ca, c, i) + for_each_online_member(c, ca) if (ca->dev == dev) { percpu_ref_put(&ca->io_ref); - return i; + return ca->dev_idx; } return -BCH_ERR_ENOENT_dev_idx_not_found; |