From patchwork Thu Jul 26 18:57:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 1244181 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 995AC3FC5A for ; Thu, 26 Jul 2012 18:57:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752428Ab2GZS5l (ORCPT ); Thu, 26 Jul 2012 14:57:41 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:37892 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752415Ab2GZS5l (ORCPT ); Thu, 26 Jul 2012 14:57:41 -0400 Received: by mail-gg0-f174.google.com with SMTP id u4so2327042ggl.19 for ; Thu, 26 Jul 2012 11:57:41 -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=aJdsdwqX7qw2cgRWftNICu2UD7NSLH2KnZXZ46nTuvI=; b=KmENscLWeQYnDXUtSZ5OLACuJyCLK5Wv0ch7pdKw9bMy7eZLTnI9Z779b6WlXU6pQZ /4N3gMZK6vmkA0qOvm7tt6IJuxJq9cJpJNqWUp8H9Rku50tetzts9MacajHc9oGlKt9u ACHsElaaY5RDL6QiGLiT9YpXtGOB1xmjj7DNDEXwZWCWPllPJxKp8lAavgL2/fPY9FhP dux9S6DdvpqJMDadk3hDyZoLOCHmfFHpHawsbfWJMb9QG4JHFflZWRqv1tV1smOnngsQ UFQ0RhFtMH+S70XxML8IVz2X+EXTyXaaSyyQZyehfDxrc0QSZ29GSilJM/meD4sbZaB/ DuiQ== Received: by 10.101.136.17 with SMTP id o17mr8880116ann.87.1343329061002; Thu, 26 Jul 2012 11:57:41 -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 v8sm20768552yhi.15.2012.07.26.11.57.39 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 11:57:40 -0700 (PDT) Message-ID: <50119323.7080001@inktank.com> Date: Thu, 26 Jul 2012 13:57:39 -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 5/7] rbd: drop "object_name" from rbd_req_sync_notify() References: <50119076.1030307@inktank.com> In-Reply-To: <50119076.1030307@inktank.com> X-Gm-Message-State: ALoCoQm0Y84VmeMlrTe8aqGcd5Lp6Sx4ZkthzujHDlsVR6MXZZ28raApu7csR3jjp17QDq2uL5Gu Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org rbd_req_sync_notify() 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc; @@ -1355,7 +1354,8 @@ static int rbd_req_sync_notify(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); if (ret < 0) goto fail_event; @@ -2647,7 +2647,7 @@ static ssize_t rbd_snap_add(struct device *dev, mutex_unlock(&ctl_mutex); /* make a best effort, don't error if failed */ - rbd_req_sync_notify(rbd_dev, rbd_dev->header_name); + rbd_req_sync_notify(rbd_dev); ret = count; kfree(name); diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 5cfeeaf..b9aa377 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -1323,8 +1323,7 @@ static void rbd_notify_cb(u64 ver, u64 notify_id, u8 opcode, void *data) /* * Request sync osd notify */ -static int rbd_req_sync_notify(struct rbd_device *rbd_dev, - const char *object_name) +static int rbd_req_sync_notify(struct rbd_device *rbd_dev) { struct ceph_osd_req_op *ops;