From patchwork Wed Dec 16 07:49:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11976887 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 C3CC9C4361B for ; Wed, 16 Dec 2020 07:50:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 751F223343 for ; Wed, 16 Dec 2020 07:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725970AbgLPHuX (ORCPT ); Wed, 16 Dec 2020 02:50:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgLPHuW (ORCPT ); Wed, 16 Dec 2020 02:50:22 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96752C061793 for ; Tue, 15 Dec 2020 23:49:41 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id m12so46010291lfo.7 for ; Tue, 15 Dec 2020 23:49:41 -0800 (PST) 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=7hQw1CN7rqeRc91OCGqhADDe8r0MUI/UCPJ4mofPVB4=; b=Ydnn19RMJmqceib2dWuxJkSuyc2G1uSEFqqielrWSKSNyMbtDSuAowYn9ZUfBJv4oE 6XeG5x2SCAwarAYtLOZ217GkXLUSXfHKAyLK4/zIsMJ/amatxRL/J1H5lqJlwVbD71r/ 76mv1FZYNuXhpLqPxZSYSJvfpnEZ6C4QeLjTc1oDL6gsYvlEaxFFLWnU2cizjixg1z9U ghqesIERv5mZ9j9GpjP9eVIda0l/kKkUYIR9p5xQcoQ1gmhQ7o5krfl/DBBgj1UVvQzB qo0QzFcc8WcI+6P84VwwGeqjvQM5lqziQVga1TRhmIS5ViaDZG5acBqO9EB+uVbYsCh8 q3EA== 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=7hQw1CN7rqeRc91OCGqhADDe8r0MUI/UCPJ4mofPVB4=; b=pJCz0P9N1lTG1IV8EMXzL2B9/G6qJBYoDBoEQxzJZiKbK4TTKLzQoDGGKn0g8mdsue a1jqg1hJTYa4o01hwqy6+p5H4uXDqj6jpNLFyiuWWu4lSdoUm6wMhjU2H95HJKGWlgOq NZPcL9DTa0t9vllojalizKWEPN0QeUWQAEZAnU/ph/HUNAk+3oCCEpIMYvouSYKVbb55 rPdQw3m0VWkB37KMBv57w1B1G6kpEh9pyr7+e8pqkXyZnmTpTh3oH6ScdxPY0/pW224R f8TwlaBP3U5RjfHtG/eJZ9po/jioiBpSYR8fDLJZ+Li4gJXo+jNYodv02dRkqDickpXn VRPg== X-Gm-Message-State: AOAM533fopg+wW3FIi96shErgoKsUpUmrG9VhFEaHG3BUMwKKUCrDd7U FyOG4XRcnzLtvY1xa40h0CyjXc96asRlJXBokD6xc7/afR+gpQ== X-Google-Smtp-Source: ABdhPJwTRVsCRlpU8vytS8XHwm+x+Oz8kcK/+QIRLj0eQUkIYPdeeGxu+GXcqM8RQwgBPtQnSlGTJLTWNE5yG4pPpjM= X-Received: by 2002:a19:828c:: with SMTP id e134mr6986767lfd.307.1608104979759; Tue, 15 Dec 2020 23:49:39 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Wed, 16 Dec 2020 01:49:27 -0600 Message-ID: Subject: [PATCH][CIFS] correct four aliased mount parms to allow use of previous names To: CIFS Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org The updates to the new mount API created aliases for some mount parms e.g. esize, idsfromsid, modefromsid, signloosely as "min_enc_offload", "setuidfromacl", "modesid", "ignore_signature" but did not add back in the original name expected by test cases and current users. It also had incorrect names for a few less used mount parms. See attached patch From 27cf94853e6d2b5c981ed4d9f798912027352584 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 16 Dec 2020 01:22:54 -0600 Subject: [PATCH] cifs: correct four aliased mount parms to allow use of previous names The updates to the new mount API created aliases for some mount parms e.g. esize, idsfromsid, modefromsid, signloosely as "min_enc_offload", "setuidfromacl", "modesid", "ignore_signature" but did not add back in the original name expected by test cases and current users. It also had incorrect names for a few less used mount parms. Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg --- fs/cifs/fs_context.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index c427e494ea56..29b99e68ec80 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -94,6 +94,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = { fsparam_flag("forcemandatorylock", Opt_forcemandatorylock), fsparam_flag("forcemand", Opt_forcemandatorylock), fsparam_flag("setuidfromacl", Opt_setuidfromacl), + fsparam_flag("idsfromsid", Opt_setuidfromacl), fsparam_flag_no("setuids", Opt_setuids), fsparam_flag_no("dynperm", Opt_dynperm), fsparam_flag_no("intr", Opt_intr), @@ -105,6 +106,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = { fsparam_flag("locallease", Opt_locallease), fsparam_flag("sign", Opt_sign), fsparam_flag("ignore_signature", Opt_ignore_signature), + fsparam_flag("signloosely", Opt_ignore_signature), fsparam_flag("seal", Opt_seal), fsparam_flag("noac", Opt_noac), fsparam_flag("fsc", Opt_fsc), @@ -112,11 +114,12 @@ const struct fs_parameter_spec smb3_fs_parameters[] = { fsparam_flag("multiuser", Opt_multiuser), fsparam_flag("sloppy", Opt_sloppy), fsparam_flag("nosharesock", Opt_nosharesock), - fsparam_flag_no("persistent", Opt_persistent), - fsparam_flag_no("resilient", Opt_resilient), + fsparam_flag_no("persistenthandles", Opt_persistent), + fsparam_flag_no("resilienthandles", Opt_resilient), fsparam_flag("domainauto", Opt_domainauto), fsparam_flag("rdma", Opt_rdma), fsparam_flag("modesid", Opt_modesid), + fsparam_flag("modefromsid", Opt_modesid), fsparam_flag("rootfs", Opt_rootfs), fsparam_flag("compress", Opt_compress), fsparam_flag("witness", Opt_witness), @@ -132,6 +135,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = { fsparam_u32("dir_mode", Opt_dirmode), fsparam_u32("port", Opt_port), fsparam_u32("min_enc_offload", Opt_min_enc_offload), + fsparam_u32("esize", Opt_min_enc_offload), fsparam_u32("bsize", Opt_blocksize), fsparam_u32("rsize", Opt_rsize), fsparam_u32("wsize", Opt_wsize), @@ -1212,14 +1216,15 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, break; case Opt_persistent: if (result.negated) { - if ((ctx->nopersistent) || (ctx->resilient)) { + ctx->nopersistent = true; + if (ctx->persistent) { cifs_dbg(VFS, "persistenthandles mount options conflict\n"); goto cifs_parse_mount_err; } } else { - ctx->nopersistent = true; - if (ctx->persistent) { + ctx->persistent = true; + if ((ctx->nopersistent) || (ctx->resilient)) { cifs_dbg(VFS, "persistenthandles mount options conflict\n"); goto cifs_parse_mount_err; -- 2.27.0