From patchwork Thu Dec 17 00:08:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 11978799 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 38908C4361B for ; Thu, 17 Dec 2020 00:09:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D72FE23731 for ; Thu, 17 Dec 2020 00:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728693AbgLQAJY (ORCPT ); Wed, 16 Dec 2020 19:09:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbgLQAJY (ORCPT ); Wed, 16 Dec 2020 19:09:24 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE61DC061794 for ; Wed, 16 Dec 2020 16:08:43 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id m12so52962210lfo.7 for ; Wed, 16 Dec 2020 16:08:43 -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=gu3NQNu36tzmGj0i7T+7tFZafUmKExhIseFuVunIBNo=; b=JeiC2k5HcHB99piSc0ae5LbAz/RBw8CM4b8qfrXkpVqDY9AcyGLFpkDCaaIE8i0Upx DK9m/swW8FClJEEraNHaqhysk6A85tvHit6iUO/szYI654b76wigi7Vyvi845XzwehTT G6XzBpbrdnx8WPnfG8hPcsikHy2/9KPCuEwRk0CN+O8Ql12Mn56eIpZgsiUlpCA8AZOe S9D2Ufg6sLYiOM4roU1DUubREMbO22HTeDLsSPy2pRC2bQBbdOym5IMY2tx5bm1+WSUK csA6p2S/XqPenhQX0u9F2QJu+eABPo3TFquLIv3ACgnig9sL9Ln9VZlhIkybZM374i+y 4A4g== 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=gu3NQNu36tzmGj0i7T+7tFZafUmKExhIseFuVunIBNo=; b=tkaWQh5kCQ0/lMbuPWOxoJaphh0x1+tuGxKusE3Hvf+MSpzMH773WwPj+B2szVhMtM p/bZmhHyhm8E9144QnK+XkTdTaTTNwn5YmB4Wq6M3y9WbKh5/0NP1xMtZsHNIsuflFQn l7aslQR0syb0EyEuDOBovWxsqzPu6aX3EhuhIMUPQGY35wxL/J3mWKxfxDT9T7cIyZ8z /XhE0wXckOnT4YtUsMgPF8XgUfBmCgEMU+XAewJHxYpxLLfsNEY7eTqZbn0HAEjqiFoa iC5ER7dAfiXYM9wHHL91ZYg20feYCVt91dxncsygFCE4bdDrnq2Vj4n+ZWm3hyBSuphQ Gu5A== X-Gm-Message-State: AOAM533nzztF4wT3KHOyuxmDy5h+0VrZD/QGozIlvIckDnsQhFHLGEhR ciM58JPsGO4c1N1iw1wef83q+QxLihXgBJHt1BL9t1S89x8zig== X-Google-Smtp-Source: ABdhPJyJSgM2+7F0jlzmKn6cH1Mg4Tz+dc+nEhNmxQZI2jAlCR/RlA2ANzrBMWpwKL6z7CdAGU3yJmok3weoWB7hQvs= X-Received: by 2002:a19:828c:: with SMTP id e134mr8373475lfd.307.1608163721783; Wed, 16 Dec 2020 16:08:41 -0800 (PST) MIME-Version: 1.0 From: Steve French Date: Wed, 16 Dec 2020 18:08:30 -0600 Message-ID: Subject: [CIFS][PATCH] Fix support for remount when not changing rsize/wsize To: CIFS , ronnie sahlberg Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org When remounting with the new mount API, we need to set rsize and wsize to the previous values if they are not passed in on the remount. Otherwise they get set to zero which breaks xfstest 452 for example. Signed-off-by: Steve French --- fs/cifs/fs_context.c | 7 +++++++ 1 file changed, 7 insertions(+) From 994abd27dbae6001739ab7bd203e8dad5dddd6b4 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 16 Dec 2020 18:04:27 -0600 Subject: [PATCH] cifs: Fix support for remount when not changing rsize/wsize When remounting with the new mount API, we need to set rsize and wsize to the previous values if they are not passed in on the remount. Otherwise they get set to zero which breaks xfstest 452 for example. Signed-off-by: Steve French --- fs/cifs/fs_context.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c index 734b30db580f..0afccbbed2e6 100644 --- a/fs/cifs/fs_context.c +++ b/fs/cifs/fs_context.c @@ -707,6 +707,13 @@ static int smb3_reconfigure(struct fs_context *fc) STEAL_STRING(cifs_sb, ctx, nodename); STEAL_STRING(cifs_sb, ctx, iocharset); + /* if rsize or wsize not passed in on remount, use previous values */ + if (ctx->rsize == 0) + ctx->rsize = cifs_sb->ctx->rsize; + if (ctx->wsize == 0) + ctx->wsize = cifs_sb->ctx->wsize; + + smb3_cleanup_fs_context_contents(cifs_sb->ctx); rc = smb3_fs_context_dup(cifs_sb->ctx, ctx); smb3_update_mnt_flags(cifs_sb); -- 2.27.0