From patchwork Tue Aug 9 14:43:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Dryomov X-Patchwork-Id: 9271393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D4D356075A for ; Tue, 9 Aug 2016 14:44:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6E3E27DCD for ; Tue, 9 Aug 2016 14:44:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB7DB283F2; Tue, 9 Aug 2016 14:44:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 658C227DCD for ; Tue, 9 Aug 2016 14:44:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932094AbcHIOoD (ORCPT ); Tue, 9 Aug 2016 10:44:03 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:35044 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752748AbcHIOoA (ORCPT ); Tue, 9 Aug 2016 10:44:00 -0400 Received: by mail-yw0-f195.google.com with SMTP id r9so597010ywg.2 for ; Tue, 09 Aug 2016 07:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=1/kvEjMukXMgEf/J46ho6JTM5C9D/Lnvv4lqtYpqtQc=; b=wNlmiT/4u+utDzer7FsTkz81RkP2R6HWi11f3DtMnwAZ496m3zNBsxqq+88l6zWmbt EELWBTu/QlH6MKOEkVk4sZT6lCNKZ+z4hN2N9MQCTKAaGSZ7rSkS0HhzhIhfvXPg06+O lMaPbYO1tYv80M8oYSo6IW/Gg6JyNZXhqdo5/bKrS8CjClrOunLBvg9bkLDGBwx7VDTL NUEch7e8lHrvPT3FZnY+Wlu9Lc4mpspVhRueR0wn3QC97kOwPOHxZkmW9s6WuHy508qc fwDAe4aeN25mLpe+/pD/yDBR8TnRUyH2kmAwT0i2bIr9R32YHFXT8m9SX5jRbQewBG5A FwfQ== 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; bh=1/kvEjMukXMgEf/J46ho6JTM5C9D/Lnvv4lqtYpqtQc=; b=lA/uz6N/DS2CIb7VWqP0ThYCWfL1NcNCMXWSSYjSxQNrqmolnHq68to3RNEEnI/zyi vqZxWv5cDsBiza3dM90ICOXg/saHgRKHv7JuEX61eIsipZIPa3e2IznOiiTvYfBgRkAR 5/yEr8oyVh1j36kP6zUlwkNBJWw41YMzVkoRk5Q50O00EkrHJTlmeyM57c9SSh5X8tZb YDNmWk3neXqvRskbo8eFHbLX5dw6nE0qY4soC2ItfuIykL2Xy0q+VrC5OwfEiDbam0tA 3nfmuk8q6ZU8KdJgSMg/nWdSmZNqFWPA6GF4hCq1VnkmJ+FUSRjKvSoGYitdO+G16Wwz ux3Q== X-Gm-Message-State: AEkoouv/1fnYfrsMM7KGIA0jgwENQUx3QSwZ74REBh7ysrZA1IixDN5gccdP/7IshOUBnA== X-Received: by 10.129.122.7 with SMTP id v7mr71788632ywc.219.1470753839589; Tue, 09 Aug 2016 07:43:59 -0700 (PDT) Received: from dhcp-1-133.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id f10sm16180479ywb.22.2016.08.09.07.43.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Aug 2016 07:43:59 -0700 (PDT) From: Ilya Dryomov To: ceph-devel@vger.kernel.org Cc: Zheng Yan Subject: [PATCH] ceph: initialize pathbase in the !dentry case in encode_caps_cb() Date: Tue, 9 Aug 2016 16:43:35 +0200 Message-Id: <1470753815-5848-1-git-send-email-idryomov@gmail.com> X-Mailer: git-send-email 2.4.3 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pathbase is the base inode; set it to 0 if we've got no path. Coverity-id: 146348 Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- fs/ceph/mds_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index fa59a85226b2..f72d4ae303b2 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2759,6 +2759,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, } else { path = NULL; pathlen = 0; + pathbase = 0; } spin_lock(&ci->i_ceph_lock);