From patchwork Sat Dec 17 15:53:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 13075863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75A84C4332F for ; Sat, 17 Dec 2022 16:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230473AbiLQQDk (ORCPT ); Sat, 17 Dec 2022 11:03:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230491AbiLQQDO (ORCPT ); Sat, 17 Dec 2022 11:03:14 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9F1A12776 for ; Sat, 17 Dec 2022 07:53:19 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id bp15so7780130lfb.13 for ; Sat, 17 Dec 2022 07:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=3UaBhxTyAy3Cq6TIwF6CLYxFnkm4dDlvGtmEbPaWaGE=; b=dOeWUEe8I3ZmW48pUy/595OHRMmF21pdAYHiMJ+84IfRgG10ZDfRzUoCxmNHz+r5vX b83s+0/tZeJs202RlgZVqGZE74HOxolbtGlaXMfM6czZnE00P0OHV0YP6lb+dyNaGbvU /jGnrIsdvLCHszf3SCLj3p16Lkqbh8QVpCyFej3F1xT1z8Ox3oTYZbvfryalF2v3RzX1 im7iPcPT/pBuVMyX6Pg8/pDRLNbO0MZrQ2v4SpwzG4MovHVA8i3XvbBrrUXaTup5skfV pQMh8VGPgSMsa3M8Q+Mp4+oAcLuaXB20SEHff0SSlpM3keoXpesyNZPvUGddBGWYipyf 6Ccw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=3UaBhxTyAy3Cq6TIwF6CLYxFnkm4dDlvGtmEbPaWaGE=; b=UcNemanvJ4ppOZSxPo9/JBWZ98Pj0XGueDzIXfx2M6d19uhQZio8NWbf68CPUj95C0 rzLpMCwSwHheY5LOoznnw8/7+YjrUzagBzO4Jj+xWIYohDJAmtCpIL9XY5K2W4gKml+x XJuwmcegl4VS5hll1D3PtgnerBuNLXlRz1+7xBEyn3/dkX1ODJMrLiUCk+s06YP+bRye RyLO2p7rbSNIZ8GSpTEnZJkRosy8IbeB96CEjzFohn/kG0BzEO+PEDVcBtk0ONl+rp+J 0/PFK0g0eWQ6LnmewSRPxpO4AsrJPJFyosrMqVkf8oMDSDsK5JVA4AYQQJxOHLJx1+t0 INYg== X-Gm-Message-State: ANoB5pkk5twyW+uttyDVvpkILXEPZGuuMQ/6CHQdpkZPepm+XdZA7s5K 18GxW8ALS+iN/rnmAMi5MQiYKlm8p5xhi1pGiGz8oZk6 X-Google-Smtp-Source: AA0mqf6GVG+cx+heTN+Uz2+F9Z9d7IMKjPHPYv0nChqN/V1+OVNCnOO0ryvmrl+Z+yXQf8ZtuoeSHMsMK0GVJUDuAzI= X-Received: by 2002:a19:5f03:0:b0:4a2:67ea:a06 with SMTP id t3-20020a195f03000000b004a267ea0a06mr32413033lfb.580.1671292397659; Sat, 17 Dec 2022 07:53:17 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Sat, 17 Dec 2022 09:53:06 -0600 Message-ID: Subject: [PATCH][SMB3 client] DFS/reconnect fixes part 1 of 4 To: CIFS Cc: Paulo Alcantara Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Noticed that some of the recent DFS/reconnect patches sent to the mailing list bounced. resending ... From ec3cc14dc65882299947dcc5d24a69015bb50d70 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara Date: Tue, 4 Oct 2022 18:41:31 -0300 Subject: [PATCH 03/14] cifs: remove unused smb3_fs_context::mount_options Just remove it as it's no longer used during mount. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French --- fs/cifs/fs_context.c | 9 --------- fs/cifs/fs_context.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index 2c92a821e028..40fbf46886cc 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -308,7 +308,6 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx { memcpy(new_ctx, ctx, sizeof(*ctx)); new_ctx->prepath = NULL; - new_ctx->mount_options = NULL; new_ctx->nodename = NULL; new_ctx->username = NULL; new_ctx->password = NULL; @@ -321,7 +320,6 @@ smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb3_fs_context *ctx * Make sure to stay in sync with smb3_cleanup_fs_context_contents() */ DUP_CTX_STR(prepath); - DUP_CTX_STR(mount_options); DUP_CTX_STR(username); DUP_CTX_STR(password); DUP_CTX_STR(server_hostname); @@ -569,17 +567,12 @@ static const struct fs_context_operations smb3_fs_context_ops = { static int smb3_fs_context_parse_monolithic(struct fs_context *fc, void *data) { - struct smb3_fs_context *ctx = smb3_fc2context(fc); char *options = data, *key; int ret = 0; if (!options) return 0; - ctx->mount_options = kstrdup(data, GFP_KERNEL); - if (ctx->mount_options == NULL) - return -ENOMEM; - ret = security_sb_eat_lsm_opts(options, &fc->security); if (ret) return ret; @@ -1581,8 +1574,6 @@ smb3_cleanup_fs_context_contents(struct smb3_fs_context *ctx) /* * Make sure this stays in sync with smb3_fs_context_dup() */ - kfree(ctx->mount_options); - ctx->mount_options = NULL; kfree(ctx->username); ctx->username = NULL; kfree_sensitive(ctx->password); diff --git a/fs/cifs/fs_context.h b/fs/cifs/fs_context.h index bbaee4c2281f..159bcfd509d4 100644 --- a/fs/cifs/fs_context.h +++ b/fs/cifs/fs_context.h @@ -264,8 +264,6 @@ struct smb3_fs_context { __u16 compression; /* compression algorithm 0xFFFF default 0=disabled */ bool rootfs:1; /* if it's a SMB root file system */ bool witness:1; /* use witness protocol */ - - char *mount_options; }; extern const struct fs_parameter_spec smb3_fs_parameters[]; -- 2.34.1