diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-09 08:23:50 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:31 +0300 |
commit | 84c72755b9aab31ed43e50eb5c7229d7ef042f7d (patch) | |
tree | 71dec50f00068356f9707de15b9f77d29ecf2d0b /fs/bcachefs/ec.c | |
parent | ce6201c456571d919e722eec3c17f868f0575b05 (diff) | |
download | linux-84c72755b9aab31ed43e50eb5c7229d7ef042f7d.tar.xz |
bcachefs: Initialize ec work structs early
We need to ensure that work structs in bch_fs always get initialized -
otherwise an error in filesystem initialization can pop a warning in the
workqueue code when we try to cancel a work struct that wasn't
initialized.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r-- | fs/bcachefs/ec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index 7a524f604875..ae33d3ea8ec1 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -1682,11 +1682,14 @@ void bch2_fs_ec_exit(struct bch_fs *c) bioset_exit(&c->ec_bioset); } -int bch2_fs_ec_init(struct bch_fs *c) +void bch2_fs_ec_init_early(struct bch_fs *c) { INIT_WORK(&c->ec_stripe_create_work, ec_stripe_create_work); INIT_WORK(&c->ec_stripe_delete_work, ec_stripe_delete_work); +} +int bch2_fs_ec_init(struct bch_fs *c) +{ return bioset_init(&c->ec_bioset, 1, offsetof(struct ec_bio, bio), BIOSET_NEED_BVECS); } |