X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosd%2Fosd_handler.c;h=8361deb4adefb87680b36f5fdd6dd25135bcab33;hp=39ac11b5f3c8218abcd23f5ed5594b491d71e81d;hb=a16eedc674f96364a8a7e4905112dc45d10e2f84;hpb=d7e596fae9b3c9d334479dfcd114607eb8bbc55e diff --git a/lustre/osd/osd_handler.c b/lustre/osd/osd_handler.c index 39ac11b..8361deb 100644 --- a/lustre/osd/osd_handler.c +++ b/lustre/osd/osd_handler.c @@ -2207,16 +2207,8 @@ static struct dt_index_operations osd_index_compat_ops = { /* * OSD device type methods */ -static int osd_type_init(struct lu_device_type *t) -{ - LU_CONTEXT_KEY_INIT(&osd_key); - return lu_context_key_register(&osd_key); -} - -static void osd_type_fini(struct lu_device_type *t) -{ - lu_context_key_degister(&osd_key); -} + +LU_TYPE_INIT_FINI(osd, &osd_key); static struct lu_context_key osd_key = { .lct_tags = LCT_DT_THREAD | LCT_MD_THREAD,