- /* Note: add_rec/delcare_add_rec will be only used by catalogs */
- osp_mds_ost_orig_logops = llog_osd_ops;
- osp_mds_ost_orig_logops.lop_add = llog_cat_add_rec;
- osp_mds_ost_orig_logops.lop_declare_add = llog_cat_declare_add_rec;
-
- /* create "osc" entry in procfs for compatibility purposes */
- type = class_search_type(LUSTRE_OSC_NAME);
- if (type != NULL && type->typ_procroot != NULL)
- return rc;
-
- type = class_search_type(LUSTRE_OSP_NAME);
- type->typ_procsym = lprocfs_register("osc", proc_lustre_root,
- NULL, NULL);
- if (IS_ERR(type->typ_procsym)) {
- CERROR("osp: can't create compat entry \"osc\": %d\n",
- (int) PTR_ERR(type->typ_procsym));
- type->typ_procsym = NULL;
+ /* create "osc" entry for compatibility purposes */
+ sym = class_add_symlinks(LUSTRE_OSC_NAME, false);
+ if (IS_ERR(sym)) {
+ rc = PTR_ERR(sym);
+ /* does real "osc" already exist ? */
+ if (rc == -EEXIST)
+ rc = 0;