From patchwork Wed Nov 27 12:25:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiubo Li X-Patchwork-Id: 11263915 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 62C2F14ED for ; Wed, 27 Nov 2019 12:25:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4224A2068E for ; Wed, 27 Nov 2019 12:25:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ClHHchu6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbfK0MZy (ORCPT ); Wed, 27 Nov 2019 07:25:54 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27365 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726383AbfK0MZx (ORCPT ); Wed, 27 Nov 2019 07:25:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574857552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i+fR2QmvgcA90nbdf39PxebDagZK9bY+zK1EmUnVwt4=; b=ClHHchu6GEJNgPC2qUWDNy8aIYl1dOiuhaO8W/nb1jiD0jgt07a3w0Xi7ghKMwpLUFncy5 7OcNu7E6PGo7my/r8RAHeiMZMANi77mjFD2mFezubyVCXnp3Ai6DymLgXwbe+cilFIOt+h 7ntjUYLF1VwrTU8zBfi9mnTtORU7icY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-68-Cic0Z4MROYKLreIDmArm9w-1; Wed, 27 Nov 2019 07:25:51 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 28D4E1005516; Wed, 27 Nov 2019 12:25:50 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-69.pek2.redhat.com [10.72.12.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7BDD600CA; Wed, 27 Nov 2019 12:25:44 +0000 (UTC) From: xiubli@redhat.com To: jlayton@kernel.org Cc: sage@redhat.com, idryomov@gmail.com, zyan@redhat.com, pdonnell@redhat.com, ceph-devel@vger.kernel.org, Xiubo Li Subject: [PATCH] ceph: remove unused code in ceph_check_caps Date: Wed, 27 Nov 2019 07:25:38 -0500 Message-Id: <20191127122538.33832-1-xiubli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: Cic0Z4MROYKLreIDmArm9w-1 X-Mimecast-Spam-Score: 0 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: Xiubo Li Signed-off-by: Xiubo Li --- fs/ceph/caps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index f5a38910a82b..c62e88da4fee 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1828,7 +1828,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags, int mds = -1; /* keep track of how far we've gone through i_caps list to avoid an infinite loop on retry */ struct rb_node *p; - int delayed = 0, sent = 0; + int delayed = 0; bool no_delay = flags & CHECK_CAPS_NODELAY; bool queue_invalidate = false; bool tried_invalidate = false; @@ -2058,7 +2058,6 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags, } mds = cap->mds; /* remember mds, so we don't repeat */ - sent++; /* __send_cap drops i_ceph_lock */ delayed += __send_cap(mdsc, cap, CEPH_CAP_OP_UPDATE, 0,