/* This is a helper function which notifies all subscribers about a volume change event (creation, removal, re-sizing, re-naming, updating). Returns zero in case of success and a negative error code in case of failure.  */
int ubi_volume_notify(struct ubi_device *ubi, struct ubi_volume *vol, int ntype)
/* This is a helper function which notifies all subscribers about a volume change event (creation, removal, re-sizing, re-naming, updating). Returns zero in case of success and a negative error code in case of failure.  */
int ubi_volume_notify(struct ubi_device *ubi, struct ubi_volume *vol, int ntype)
{
	struct ubi_notification nt;
	ubi_do_get_device_info(ubi, &nt.di);
	ubi_do_get_volume_info(ubi, vol, &nt.vi);
	return blocking_notifier_call_chain(&ubi_notifiers, ntype, &nt);
}