Add the missing unlock before return from function fill_balloon()
in the error handling case.
Introduced by 9864a8 ("virtio_balloon: introduce migration primitives to
balloon pages").
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
}
/* Didn't get any? Oh well. */
- if (vb->num_pfns == 0)
+ if (vb->num_pfns == 0) {
+ mutex_unlock(&vb->balloon_lock);
return;
+ }
tell_host(vb, vb->inflate_vq);
mutex_unlock(&vb->balloon_lock);