From patchwork Mon Aug 23 19:07:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 12453461 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.7 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 0FC7AC4338F for ; Mon, 23 Aug 2021 19:07:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E81616103C for ; Mon, 23 Aug 2021 19:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230506AbhHWTIW (ORCPT ); Mon, 23 Aug 2021 15:08:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230192AbhHWTIS (ORCPT ); Mon, 23 Aug 2021 15:08:18 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A809C061575 for ; Mon, 23 Aug 2021 12:07:35 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id v19so14767213lfo.7 for ; Mon, 23 Aug 2021 12:07:34 -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:cc; bh=lsrUb2w9dBtJar0w3t01JWd9FvqTsF6Gr1yBGgISLs0=; b=IgWDfVtBV4mshlBOX21zcT1klCZo4VZiezC6Rmw0+j/vkAjBtubBgjYrMqPrq0S3DR P4/VslD2sj3jiRoGRzgZFRPi/5xlJsVEgJhsmtolIzXXBT4cbivh7iwVxOyaDsYxLQOR RhAEpyJYskbFKG3Ym/0dJeHlga7SHPCadENgEmxu4TjZKAVDELjI5qrdUIPl3QIQsfgu AYGvRRwRQ6KwBfWJBmUl1xvmXXGw/lHW+Tv0+fn8y2HsWfWCZVM/KdZ/EAQ244NVUyUp 3t7hzoc5QXt2tOj07N3gU6lHLsBToTIIpb9AqYg/R+bUou7qXYB/9W43rqKUAM7eToVn Wsvw== 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:cc; bh=lsrUb2w9dBtJar0w3t01JWd9FvqTsF6Gr1yBGgISLs0=; b=MwXBJI/X9hBzJmRdWVizPytIxdc+UScJnSakhSww+H95s9AKgmgw+OTHTT6HlXvFio kl7Fb/zc8ta2hNL8DlHz/eETpelEUjNm/YcFaC0bnsTN4935lZ5LJgz6ZoSk0cat//rG 24o5Cfxk3t68sT+S78AlApS15+9eAZqgC/Lr80FDpDyMRBhaP/mNdwUV7O1x5TvprJP0 sEzUTloA5YzOGOmkeLrZJBgQdqYGJg2Pf3U3Cx+4yxQT2atiFTX144TBCHqe0lEmscOX QVKzoLZ2XDxcnCQhVvhYru5UjsVl7rBUNdYVNFPFzdPZQ5A1gqOX8M1SjWLMCkNfFmsM ZlRg== X-Gm-Message-State: AOAM531FFedBtaUzMcy5EbcEiAllSdFaF17/bS7o8Crqoe4Rdy+kYkdU chBp77pdeL81V2CP/dkdm3Zub3FiqXqdoyNdK6ihscoLoR0= X-Google-Smtp-Source: ABdhPJyRmZNH6Qx3qE38wYUklJ7hgL/CD8r4oYCZ+sLogo6AThTOjkpH51gxAbk2uIPURUM1acgKYm7ec2TvzV8VyJE= X-Received: by 2002:a05:6512:3ef:: with SMTP id n15mr3163245lfq.184.1629745653081; Mon, 23 Aug 2021 12:07:33 -0700 (PDT) MIME-Version: 1.0 From: Steve French Date: Mon, 23 Aug 2021 14:07:22 -0500 Message-ID: Subject: [PATCH][SMB3.1.1] incorrect initialization of the posix extensions in new mount API To: CIFS Cc: Christian Brauner , Namjae Jeon Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org We were incorrectly initializing the posix extensions in the conversion to the new mount API. CC: # 5.11+ Reported-by: Christian Brauner Suggested-by: Namjae Jeon Signed-off-by: Steve French Acked-by: Christian Brauner --- fs/cifs/fs_context.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ctx->nocase = 1; From bfb7d1b8806fe8decc977963b9eddbf9c4ced9d5 Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 23 Aug 2021 13:52:12 -0500 Subject: [PATCH] smb3: fix posix extensions mount option We were incorrectly initializing the posix extensions in the conversion to the new mount API. CC: # 5.11+ Reported-by: Christian Brauner Suggested-by: Namjae Jeon Signed-off-by: Steve French --- fs/cifs/fs_context.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index 4515a0883262..3109def8e199 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -1252,10 +1252,17 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ctx->posix_paths = 1; break; case Opt_unix: - if (result.negated) + if (result.negated) { + if (ctx->linux_ext == 1) + pr_warn_once("conflicting posix mount options specified\n"); ctx->linux_ext = 0; - else ctx->no_linux_ext = 1; + } else { + if (ctx->no_linux_ext == 1) + pr_warn_once("conflicting posix mount options specified\n"); + ctx->linux_ext = 1; + ctx->no_linux_ext = 0; + } break; case Opt_nocase: ctx->nocase = 1; -- 2.30.2