[PATCH OLK-6.6 15/18] md: factor out a helper from mddev_put()