From patchwork Fri Jan 15 14:50:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 8041611 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9C965BEEE5 for ; Fri, 15 Jan 2016 14:51:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD77420434 for ; Fri, 15 Jan 2016 14:51:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC9D2203E1 for ; Fri, 15 Jan 2016 14:51:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754068AbcAOOvR (ORCPT ); Fri, 15 Jan 2016 09:51:17 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33966 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753421AbcAOOvO (ORCPT ); Fri, 15 Jan 2016 09:51:14 -0500 Received: by mail-wm0-f68.google.com with SMTP id b14so3234230wmb.1 for ; Fri, 15 Jan 2016 06:51:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cZ2RXFbs/hx7TPi2eZyQ9taHKWwOJOic1VwvCv798bE=; b=x16+XzLxtbMdNjd2Fw+TOVNcKM09+ypfqsqFbD8Zol9Ve9hR021iPM5DpXbO0o42j6 54p9co7iD8os1kq1rvANcjfMt6L2RHbMAdNxvqF6Ys2w4xmZCtQB7gr7YkplmTdUg34+ BeHTZN4GeisvrirK85y6+VR5qstagidQJ3l5l2S7Hvb8Rf5fJJIVHwOQUVoeFg6KN2Zy hdnlvSPpbrmlBlyhLueDsdTjeBMXx9W2pxOlo2bLEstRlwBMUrATMOC56YuW3h/tSj1W 7Xc1QZFDfDj2dfEgRzkOH2I67VhhRBYP0rCRX2U1gD+elPuYm5uCbJvwU9xV3bagFQ9d zMaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cZ2RXFbs/hx7TPi2eZyQ9taHKWwOJOic1VwvCv798bE=; b=ejotliQbd7dJSiavQjXDAlxLxl1jlQRYkT7N27AvJuJxzBkzHiXC9kA4Yo4a3hemlr cEEtyMUr3DFyaBiIuCKatiOXENZFy0Yf7bnODbSBs5xUKMKov4FOBIQpQmlSXIO3ZhqO kng2vewdo/Qn+4wAvmWr6O76iB3K0lJwNGEYapdfbh1DpzqYC0ub1dKLOX8pc+xlymcq LyKhLlCxInXGgtNInZp0L+7WVgTMJBBajT1w3wbUKP6+4NFCF5z0nv6EpVk0pBH5/s9s 6+TedOBWBGK3HUd9B+YLPcSTKalm1KF/bzmq+DvBq5wPjF1YT7BRg4DseircHKKnWGrl 8K6Q== X-Gm-Message-State: AG10YOQ40fJ3u6YiiLtSFTzydUBFZAMjTUPPCEooLVNGuGuWpWoCJU3Dp1hzrYd8/d5P4Q== X-Received: by 10.28.57.214 with SMTP id g205mr3755400wma.20.1452869473267; Fri, 15 Jan 2016 06:51:13 -0800 (PST) Received: from dhcp-27-199.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id jm4sm10939876wjb.7.2016.01.15.06.51.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jan 2016 06:51:12 -0800 (PST) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Cc: Sage Weil Subject: [PATCH 4/4] libceph: kill off ceph_x_ticket_handler::validity Date: Fri, 15 Jan 2016 15:50:45 +0100 Message-Id: <1452869445-10228-5-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1452869445-10228-1-git-send-email-idryomov@gmail.com> References: <1452869445-10228-1-git-send-email-idryomov@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With it gone, no need to preserve ceph_timespec in process_one_ticket() either. Signed-off-by: Ilya Dryomov --- net/ceph/auth_x.c | 6 ++---- net/ceph/auth_x.h | 1 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/ceph/auth_x.c b/net/ceph/auth_x.c index 05e9fc21d460..9e43a315e662 100644 --- a/net/ceph/auth_x.c +++ b/net/ceph/auth_x.c @@ -152,7 +152,6 @@ static int process_one_ticket(struct ceph_auth_client *ac, void *ticket_buf = NULL; void *tp, *tpend; void **ptp; - struct ceph_timespec new_validity; struct ceph_crypto_key new_session_key; struct ceph_buffer *new_ticket_blob; unsigned long new_expires, new_renew_after; @@ -193,8 +192,8 @@ static int process_one_ticket(struct ceph_auth_client *ac, if (ret) goto out; - ceph_decode_copy(&dp, &new_validity, sizeof(new_validity)); - ceph_decode_timespec(&validity, &new_validity); + ceph_decode_timespec(&validity, dp); + dp += sizeof(struct ceph_timespec); new_expires = get_seconds() + validity.tv_sec; new_renew_after = new_expires - (validity.tv_sec / 4); dout(" expires=%lu renew_after=%lu\n", new_expires, @@ -233,7 +232,6 @@ static int process_one_ticket(struct ceph_auth_client *ac, ceph_buffer_put(th->ticket_blob); th->session_key = new_session_key; th->ticket_blob = new_ticket_blob; - th->validity = new_validity; th->secret_id = new_secret_id; th->expires = new_expires; th->renew_after = new_renew_after; diff --git a/net/ceph/auth_x.h b/net/ceph/auth_x.h index 5334b9b159c5..40b1a3cf7397 100644 --- a/net/ceph/auth_x.h +++ b/net/ceph/auth_x.h @@ -16,7 +16,6 @@ struct ceph_x_ticket_handler { unsigned int service; struct ceph_crypto_key session_key; - struct ceph_timespec validity; bool have_key; u64 secret_id;