From: Sebastien Buisson Date: Mon, 22 Jul 2013 16:06:26 +0000 (+0800) Subject: staging/lustre: fix 'program hangs' errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8c47be4e883bc49171a85985e6fb54d4680c6eb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging/lustre: fix 'program hangs' errors Fix 'program hangs' defects found by Coverity version 6.5.1: Missing unlock (LOCK) Returning without unlocking. Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3054 Lustre-change: http://review.whamcloud.com/5870 Signed-off-by: Sebastien Buisson Reviewed-by: Dmitry Eremin Reviewed-by: Andreas Dilger Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c index bc1f38b80486..0dfc76e02e0b 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.c +++ b/drivers/staging/lustre/lnet/selftest/rpc.c @@ -661,8 +661,10 @@ srpc_finish_service(struct srpc_service *sv) cfs_percpt_for_each(scd, i, sv->sv_cpt_data) { spin_lock(&scd->scd_lock); - if (!swi_deschedule_workitem(&scd->scd_buf_wi)) + if (!swi_deschedule_workitem(&scd->scd_buf_wi)) { + spin_unlock(&scd->scd_lock); return 0; + } if (scd->scd_buf_nposted > 0) { CDEBUG(D_NET, "waiting for %d posted buffers to unlink",