Blame SOURCES/avoid_register.patch

325406
diff --git a/lib/activate/activate.c.avoid_register b/lib/activate/activate.c
325406
index 1d71ea8..86882f7 100644
325406
--- a/lib/activate/activate.c.avoid_register
325406
+++ b/lib/activate/activate.c
325406
@@ -964,11 +964,13 @@ activate_subset(struct lib_context *lc, struct raid_set *rs, enum dm_what what)
325406
 {
325406
 	int ret = 0;
325406
 	char *table = NULL;
325406
+	struct dmraid_format *fmt = get_format(rs);
325406
 
325406
 	if (T_GROUP(rs))
325406
 		return 1;
325406
 
325406
-	if (what == DM_REGISTER)
325406
+	if (what == DM_REGISTER &&
325406
+	    fmt->metadata_handler)
325406
 		return register_devices(lc, rs);
325406
 
325406
 	/* Call type handler */
325406
@@ -1053,8 +1055,10 @@ deactivate_superset(struct lib_context *lc, struct raid_set *rs,
325406
 		    enum dm_what what)
325406
 {
325406
 	int ret = 1, status;
325406
+	struct dmraid_format *fmt = get_format(rs);
325406
 
325406
-	if (what == DM_REGISTER)
325406
+	if (what == DM_REGISTER &&
325406
+	    fmt->metadata_handler)
325406
 		return unregister_devices(lc, rs);
325406
 
325406
 	status = dm_status(lc, rs);