From patchwork Mon Sep 13 13:15:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 510572 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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 C5E17C433FE for ; Mon, 13 Sep 2021 14:15:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2CC160F9F for ; Mon, 13 Sep 2021 14:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245627AbhIMOQ6 (ORCPT ); Mon, 13 Sep 2021 10:16:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:37398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345038AbhIMOOt (ORCPT ); Mon, 13 Sep 2021 10:14:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EB10E61AEF; Mon, 13 Sep 2021 13:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540637; bh=k6QrmouAQnh3bcPZYG3BkcLiWo6qCAT+FpjzOobLcLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ug0usjFgj6jPL/YrJjzEUPpPZ7icSTZRz6ebSMi6t92q6uoCz+DNkKHTNwkq5fgFW Ia1jtlJw2eLMO2mSWrZlbVyJJ+1NHXTu2HDSWqPbFqplI0PipWDyvoVucRiInKhS/2 nFQo5LaSH3iNDtUDNoN2XamPlnDiWJy1q7981eg4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Brauner , Namjae Jeon , Steve French Subject: [PATCH 5.13 275/300] smb3: fix posix extensions mount option Date: Mon, 13 Sep 2021 15:15:36 +0200 Message-Id: <20210913131118.622507712@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Steve French commit 7321be2663da5922343cc121f1ff04924cee2e76 upstream. We were incorrectly initializing the posix extensions in the conversion to the new mount API. CC: # 5.11+ Reported-by: Christian Brauner Acked-by: Christian Brauner Suggested-by: Namjae Jeon Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/fs_context.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -1259,10 +1259,17 @@ static int smb3_fs_context_parse_param(s 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;