/* gluebi_notify - UBI notification handler. @nb: registered notifier block @l: notification type @ptr: pointer to the &struct ubi_notification object  */
static int gluebi_notify(struct notifier_block *nb, unsigned long l, void *ns_ptr)
/* gluebi_notify - UBI notification handler. @nb: registered notifier block @l: notification type @ptr: pointer to the &struct ubi_notification object  */
static int gluebi_notify(struct notifier_block *nb, unsigned long l, void *ns_ptr)
{
	struct ubi_notification *nt = ns_ptr;
	switch (l) {
	case UBI_VOLUME_ADDED:
		gluebi_create(&nt->di, &nt->vi);
		break;
	case UBI_VOLUME_REMOVED:
		gluebi_remove(&nt->vi);
		break;
	case UBI_VOLUME_RESIZED:
		gluebi_resized(&nt->vi);
		break;
	case UBI_VOLUME_UPDATED:
		gluebi_updated(&nt->vi);
		break;
	default:
		break;
	}
	return NOTIFY_OK;
}