From patchwork Sat Jun 19 21:28:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 12333191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22B75C2B9F4 for ; Sat, 19 Jun 2021 21:29:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF79460FE9 for ; Sat, 19 Jun 2021 21:29:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229477AbhFSVbS (ORCPT ); Sat, 19 Jun 2021 17:31:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbhFSVbS (ORCPT ); Sat, 19 Jun 2021 17:31:18 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 718DCC061574 for ; Sat, 19 Jun 2021 14:29:05 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id m21so22997110lfg.13 for ; Sat, 19 Jun 2021 14:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=rEiWUXE2a7U8vX2G+sJywEz4jd5xUVUJf0/NXsG3dXc=; b=JFaSt2TOpklAbbGw1SGnSvxUyN8585V115VkA1XD4rl5wbLPO/i2pvQ4rG1H+QAQHy cFPbp7TGrRuB3oElbpOE/vR/uIXwM1QLW6Yi4QPJYMcVTpNhujHGly8HvwJlPH2qtgO3 VwYY1BVO32hMqe5SV1RBz3WwFt+vu9zkt7Sr40jxU+0eJy+9ZblOcAt74idZACYBVosq UqQbhTuOVxtaMXqPvDahkRpYtUayPI7x7LM8FJJo1bIl0KuJQQcxwHfO/rex4tWtXPX/ 4nCsDnIBHSI1fdKsHtgVRUnd8bq/D32LuRkOXXzitlfEI210vywxgRGcSKuxKf+MQom/ d2kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rEiWUXE2a7U8vX2G+sJywEz4jd5xUVUJf0/NXsG3dXc=; b=TAAbBQK1Fxc/TFd4PYgD03aWjAa3FWFWHi5wXXp8NSVxO2J3Prf4wFlriMLtAmt6xL uAIJGTUglBviSXIOvUabTLrSvdRTxkeVtvc/LNFweLTRpfPKsy6WDTBE5sWfggIhzNoo D3xtVNNF601axWmuI6bsUK4DI28MHoJNGKY7k9ThnHwY8IVv7F0mwBcUSogiMddRL9TA xdjhRrWh3kAqTMTDLwuozJXu0IpQG5Tv/2xvy0foMwrjUKQYPgzin7Ldby8y1bSoQtmW VOur4dvmXnrfvtS1qyWkHd45Iflcdt1/hmVbPK8wXSyCDIwwdO3WAkdGGpxfg++UvmoY kEMA== X-Gm-Message-State: AOAM5322KIQAsOF+PIcDlM+WSgHF+VPYTmgCFl5WizgK6J/ESUuPIkLH ZtC6kP5YpcADQGQyw4Srr0B7gZe3aezOQmgkMt/TXfnz5KlYPw== X-Google-Smtp-Source: ABdhPJxaH9KrMtouS2ivRgSFu0/3IG/ql3OxYGW0Ah2b6S0+nQQJ/Opg9v9H1hZv3w4HNrEero6ERIU5DFQJiE+K0Zw= X-Received: by 2002:a19:6a0e:: with SMTP id u14mr8472264lfu.184.1624138143058; Sat, 19 Jun 2021 14:29:03 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Sat, 19 Jun 2021 16:28:51 -0500 Message-ID: Subject: [PATCH][SMB311] remove dead code for non-compounded SMB311 posix query info To: CIFS Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Although we may need this in some cases in the future, remove the currently unused, non-compounded version of POSIX query info, SMB11_posix_query_info (instead smb311_posix_query_path_info is now called e.g. when revalidating dentries or retrieving info for getattr) Addresses-Coverity: 1495708 ("Resource leaks") From 4f0bac6b66da3618d71b89f3c98faec5d1c3fac8 Mon Sep 17 00:00:00 2001 From: Steve French Date: Sat, 19 Jun 2021 16:19:09 -0500 Subject: [PATCH] smb311: remove dead code for non compounded posix query info Although we may need this in some cases in the future, remove the currently unused, non-compounded version of POSIX query info, SMB11_posix_query_info (instead smb311_posix_query_path_info is now called e.g. when revalidating dentries or retrieving info for getattr) Addresses-Coverity: 1495708 ("Resource leaks") Signed-off-by: Steve French --- fs/cifs/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 4a244cc4e902..98586876a955 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -3484,6 +3484,8 @@ int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, NULL); } +#ifdef 0 +/* currently unused, as now we are doing compounding instead (see smb311_posix_query_path_info) */ int SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen) @@ -3495,7 +3497,9 @@ SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon, return query_info(xid, tcon, persistent_fid, volatile_fid, SMB_FIND_FILE_POSIX_INFO, SMB2_O_INFO_FILE, 0, output_len, sizeof(struct smb311_posix_qinfo), (void **)&data, plen); + /* Note caller must free "data" (passed in above). It may be allocated in query_info call */ } +#endif int SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, -- 2.30.2