From patchwork Tue Mar 29 03:25:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 670572 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2T3QH5d018572 for ; Tue, 29 Mar 2011 03:26:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932256Ab1C2D0Q (ORCPT ); Mon, 28 Mar 2011 23:26:16 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:53173 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932181Ab1C2D0P (ORCPT ); Mon, 28 Mar 2011 23:26:15 -0400 Received: by mail-fx0-f46.google.com with SMTP id 17so3163692fxm.19 for ; Mon, 28 Mar 2011 20:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=PvrySe17YDEqd4/M+88cVBh2ZDZM3V/1PCt94Vt9oYw=; b=lQoN+gzZo62uf6lY1ypAwt49gASwZmm+wf0BNXTToivTEBaM/sbSaDlw7ZTddylLNZ wY1UP5iRRiUuLSyM00sAoxnxsUn+Xe/gIl8Nxmx0EVv+UgH7GGhEXeXHwFvf2py+s+8m GhGzoe8DeujQKrkc7TgBCaOwAHYH+cD30s9TU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=q9cRjUS3tjK8CS5fYh4SZHXFb3T502j0JW+Tu3OYi91CXMUopDdMrMvh/S2bH8pl4c s48WZzl3Sv+O/Xux0NhTCXQDV+Sxj8ubc4exrtNOiH8di3vjxSozXWJiJLLlYUZUNnln 3WTn9rFwB9GKY22A9Bdj8vtCYWiPIphL3rD28= Received: by 10.223.87.68 with SMTP id v4mr5218501fal.116.1301369174683; Mon, 28 Mar 2011 20:26:14 -0700 (PDT) Received: from bicker ([212.49.88.34]) by mx.google.com with ESMTPS id n7sm1750821fam.35.2011.03.28.20.26.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 20:26:14 -0700 (PDT) Date: Tue, 29 Mar 2011 06:25:59 +0300 From: Dan Carpenter To: Sage Weil Cc: ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 2/2] ceph: unlock on error in ceph_osdc_start_request() Message-ID: <20110329032559.GF9856@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 29 Mar 2011 03:26:18 +0000 (UTC) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index b6776cb..03740e8 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1672,7 +1672,7 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, if (req->r_sent == 0) { rc = __map_request(osdc, req); if (rc < 0) - return rc; + goto out_unlock; if (req->r_osd == NULL) { dout("send_request %p no up osds in pg\n", req); ceph_monc_request_next_osdmap(&osdc->client->monc); @@ -1689,6 +1689,8 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, } } } + +out_unlock: mutex_unlock(&osdc->request_mutex); up_read(&osdc->map_sem); return rc;