From patchwork Thu Jul 26 18:57:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1244201 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3EB023FC5A for ; Thu, 26 Jul 2012 18:57:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482Ab2GZS55 (ORCPT ); Thu, 26 Jul 2012 14:57:57 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:54228 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752426Ab2GZS54 (ORCPT ); Thu, 26 Jul 2012 14:57:56 -0400 Received: by mail-yw0-f46.google.com with SMTP id m54so2338429yhm.19 for ; Thu, 26 Jul 2012 11:57:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=t2RAgJdUKbw4Lg+BAfJIgy525GKfV7N1ac5ZPs1z0og=; b=CQYwRVopUcH0/LLKNiqRcRRKkw3Uvsd27aoqUk3Bl2Gl9HA89SKpnI6LbBaOJs+P2u r4Z4USZuBzoP7PZPeTV/uSi1WmPsfBKgAewAJQA8RPXdMizCIren/wxibykslBQt1C58 zxjrZzTqexH73/AnogaZiTgrVvA+Tz4xKLMH65wO+Vof81cQvdR1gLuztJf1kR8LEGL0 5m0rWKUo1zjR7HDukm2Rtv7gkGCkqk2HwdY/5MaJ9+s+LT7nGX/ETtK+ZZgGMgiTDn1L LoZmcI255GI9DiSYz35eANNiIB90G4sHkmkmFceCPXB0b10wxdqDesMXxZ3/O9KoqyGu z1hw== Received: by 10.236.155.10 with SMTP id i10mr16309609yhk.91.1343329076511; Thu, 26 Jul 2012 11:57:56 -0700 (PDT) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id x8sm43492350yhd.18.2012.07.26.11.57.55 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 11:57:55 -0700 (PDT) Message-ID: <50119333.50908@inktank.com> Date: Thu, 26 Jul 2012 13:57:55 -0500 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: ceph-devel@vger.kernel.org Subject: [PATCH 7/7] rbd: drop "object_name" from rbd_req_sync_unwatch() References: <50119076.1030307@inktank.com> In-Reply-To: <50119076.1030307@inktank.com> X-Gm-Message-State: ALoCoQl4TVNcdW8byCRrJyPUX7cs+mgUQz8MFo4NsNQkxVL96rJFdewqCCW6vnkUBDDBswHb7+Uz Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org rbd_req_sync_unwatch() only ever uses rbd_dev->header_name as the value of its "object_name" parameter, and that value is available within the function already. So get rid of the parameter. Signed-off-by: Alex Elder --- drivers/block/rbd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ceph_osdc_cancel_event(rbd_dev->watch_event); @@ -2563,7 +2564,7 @@ static void rbd_dev_release(struct device *dev) rbd_dev->watch_request); } if (rbd_dev->watch_event) - rbd_req_sync_unwatch(rbd_dev, rbd_dev->header_name); + rbd_req_sync_unwatch(rbd_dev); rbd_put_client(rbd_dev); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 48a7927..fd5f3038 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1279,8 +1279,7 @@ fail: /* * Request sync osd unwatch */ -static int rbd_req_sync_unwatch(struct rbd_device *rbd_dev, - const char *object_name) +static int rbd_req_sync_unwatch(struct rbd_device *rbd_dev) { struct ceph_osd_req_op *ops; @@ -1297,7 +1296,9 @@ static int rbd_req_sync_unwatch(struct rbd_device *rbd_dev, 0, CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK, ops, - object_name, 0, 0, NULL, NULL, NULL); + rbd_dev->header_name, + 0, 0, NULL, NULL, NULL); + rbd_destroy_ops(ops);