get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2234255/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2234255,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234255/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260507134448.168602-2-rajasimandalos@gmail.com/",
    "project": {
        "id": 12,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/12/?format=api",
        "name": "Linux CIFS Client",
        "link_name": "linux-cifs-client",
        "list_id": "linux-cifs.vger.kernel.org",
        "list_email": "linux-cifs@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260507134448.168602-2-rajasimandalos@gmail.com>",
    "list_archive_url": null,
    "date": "2026-05-07T13:44:41",
    "name": "[v2,1/8] smb: client: block non-reconfigurable option changes on remount",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "51e08f4ee91609d42df6a5b6ff76995f1d949f17",
    "submitter": {
        "id": 91740,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/91740/?format=api",
        "name": "RAJASI MANDAL",
        "email": "rajasimandalos@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260507134448.168602-2-rajasimandalos@gmail.com/mbox/",
    "series": [
        {
            "id": 503184,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503184/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=503184",
            "date": "2026-05-07T13:44:40",
            "name": "Remount patches v2",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/503184/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2234255/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2234255/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-11410-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-cifs@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=ZI7ALS9c;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-11410-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"ZI7ALS9c\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.216.54",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gBD705xW9z1y04\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 07 May 2026 23:46:20 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 988EC3010148\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  7 May 2026 13:45:00 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B0B8A3F23D8;\n\tThu,  7 May 2026 13:44:59 +0000 (UTC)",
            "from mail-pj1-f54.google.com (mail-pj1-f54.google.com\n [209.85.216.54])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 22E1A3C73E5\n\tfor <linux-cifs@vger.kernel.org>; Thu,  7 May 2026 13:44:58 +0000 (UTC)",
            "by mail-pj1-f54.google.com with SMTP id\n 98e67ed59e1d1-364eef1891dso632429a91.1\n        for <linux-cifs@vger.kernel.org>;\n Thu, 07 May 2026 06:44:58 -0700 (PDT)",
            "from dev-vm-rm.hzz4ddxqtfeetjrh00qlbgyytb.rx.internal.cloudapp.net\n ([20.197.52.255])\n        by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-365b4c8a8e7sm8316609a91.13.2026.05.07.06.44.54\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 07 May 2026 06:44:56 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1778161499; cv=none;\n b=Tf++2nV3pzKaZJQoz3a8acYe6evVDeaG+7WHUwNfC6fkkFJfQtmbhUyNgPjfi31dxWmiGvMybr+7bOUjaMKg94/pSFVAuO870Hfl0m/N+RfWPk4vrZL4qxzG4kXgzAxd61sEJde/lfajvTtzVkDCgWcoTtaqbCte8uLpD+VFIjo=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1778161499; c=relaxed/simple;\n\tbh=TzRfb8WohHechkim8jiUApyp4Jrd88OVkcA6LEUB/Ss=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=rYagdNs16DIOfX+1dcqmSfRaLOSP+mLp6TbYALJYP//1qsgHMTA66dhNWXxf+sW0yOtUAjj1582OnUq9zr7g6EC6JP7iI10qxISq25SEGNmR1gey9bcpg8SJr7pn9826hDbYX2e8gcgaZMR9XBqw7cyE9NPBNIPEm4oQ8HuGtGM=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=ZI7ALS9c; arc=none smtp.client-ip=209.85.216.54",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1778161497; x=1778766297;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=uNOWW83EwgZbUEuIj2igXZFSfemGYF9D6yJkx6D5/ns=;\n        b=ZI7ALS9cCKAX8YdC9AFkd06a1/Ello0kam49bztRJQA7XJL/f0ZfdbR3O374Z/8uhG\n         orOhW9tCHiWCdGvLVwYGfIqKYVZP4k4F0LIIFiRJN4fC2ZqeQVM/fUh6zdhcgxwebxMh\n         wmxgZXZwsugI3F/WxYfy9IPxO5kdRa0hZAYEN38+WZxF35fIAwrtM74HfIojyKk0Teib\n         OfhOp1NIcBVtAW5xXfCVfLcU09lmP3xyWFDWZewmR6LgI2Bf7U3sjLM5Zz+BgSQRFoLW\n         L5QdPGupjfaHQcAflQ3T2+LVGVqPuOD03J9XnUfHaW4F9cCiv5FswkQvfaMqW8mzc2xU\n         NmQg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1778161497; x=1778766297;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=uNOWW83EwgZbUEuIj2igXZFSfemGYF9D6yJkx6D5/ns=;\n        b=fNfQ6nT9PBUkCwcdk3daPtaqcFUh2ad2N2mve4+5eoSE3rL2hTsgRRBmg/oXqcxDHC\n         MMPqhqEw01bMtpswGPKcnZ6cJ5nq+18V5J8U8I/6pqYKmcxUfJW4LlrKt0wBgKzz3F1T\n         YF7NezaZKEJ4b17cwh7mqerEUOHcOVENau3f67czmDlE5phhjgCCwwKRsDZ2m/o3OZBw\n         xf2QDfHMekJmFRFftiMGwat8P4IpLfeIkGkhvm5FCpZ6ueYZX5BCK6yBmeWkGrS9nmFR\n         5qCkilQbhOprLxwDGLUqPq90S/D/aEQaeWaW0KlaQCC6C8Ykbpfz+PtYXyhiztjhByP5\n         8YHQ==",
        "X-Gm-Message-State": "AOJu0Yx638vlsKqfsIFO/b5Y/wViNsoiSxegn6GvOHXLDvK8hIDG50/3\n\tuTBaZ7EarEpsNq7xeMaQKxiI5sOsUbgrBl+eW58Je5S31wASN7BOyHb/T09ViA==",
        "X-Gm-Gg": "AeBDieu7kk+Zs1SBsQkov1kibNdGm39as9UZEdNwIQbGUTJEPkjjiNL7jqe0PWpI1/5\n\tG9XUjntpV2YwN/W6VG2T/sKuXXMzQYf+xQExiNZxxrQZdq6HJSEYqliCryDUspCApD9h4db4wD8\n\ty27PalAPzPzBQRS5TH/1q0lG62ydTBrq/a2P6NGF9B/XUtHknxxy1pcINJZhJydxYJk+8E8cO6Z\n\tNGBIeENbCxfxWi5B8CE8HZLG6S4yxLl8geYG3Mg195f2r1AUnWfMI6Dk/JN2v8lRgMbEDyfX96B\n\t1tuFdy0PKk9cUsmIGroc6gB4fghpq95nef6+o1b1RSIGZA9KdnEFalKxWykgwkD25qe0V1519fT\n\t+jgSt0sEpT/ESJs0W2S+oaVn2QzUwmLTHmYVJf06urOKndF13e3DrVufE1O0zSovV0ftkomtYtJ\n\tmCdyOm8P7slFhPZ2YqBEgez+uHg4Aq0O5oKKzyglBtKU/vNFeapfInziCrvRTu0NBZ1FCsSty8r\n\tgIiKGNwzCLs0o39R5O2+sQcwrJUstAkPA==",
        "X-Received": "by 2002:a17:90b:3804:b0:35f:bfdd:f5a1 with SMTP id\n 98e67ed59e1d1-365abe7fdddmr7582587a91.13.1778161496970;\n        Thu, 07 May 2026 06:44:56 -0700 (PDT)",
        "From": "rajasimandalos@gmail.com",
        "To": "linux-cifs@vger.kernel.org",
        "Cc": "smfrench@gmail.com,\n\tpc@manguebit.org,\n\tsprasad@microsoft.com,\n\tbharathsm@microsoft.com,\n\tenzo@kernel.org",
        "Subject": "[PATCH v2 1/8] smb: client: block non-reconfigurable option changes\n on remount",
        "Date": "Thu,  7 May 2026 13:44:41 +0000",
        "Message-ID": "<20260507134448.168602-2-rajasimandalos@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260507134448.168602-1-rajasimandalos@gmail.com>",
        "References": "<20260507134448.168602-1-rajasimandalos@gmail.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-cifs@vger.kernel.org",
        "List-Id": "<linux-cifs.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "From: Rajasi Mandal <rajasimandal@microsoft.com>\n\nSeveral mount options (seal, sign, vers, ip, rdma, nosharesock,\npersistent/resilient handles, etc.) require tearing down the\nconnection to take effect, but smb3_verify_reconfigure_ctx()\ndoes not reject them.  A remount that changes any of these silently\nignores the new value, confusing users.\n\nAdding simple != checks to smb3_verify_reconfigure_ctx() does not\nwork with the current code because smb3_init_fs_context() always\ncreates a fresh context with init defaults on remount.  Since\ncifs_show_options() reads many fields from tcon/server/ses rather\nthan from ctx, the init defaults differ from the runtime state\nand every != check would spuriously fire.\n\nFix this by detecting FS_CONTEXT_FOR_RECONFIGURE in\nsmb3_init_fs_context() and duplicating the existing cifs_sb->ctx\ninstead of building one from scratch.  Before duplicating, sync\nctx with runtime state via new helper smb3_sync_ctx_from_tcon()\nso the baseline matches what cifs_show_options() displays.  With\nthis in place, add comprehensive checks in\nsmb3_verify_reconfigure_ctx() to reject non-reconfigurable option\nchanges with clear error messages.\n\nAlso preserve inherited multichannel/max_channels values in\nsmb3_handle_conflicting_options() during reconfigure when neither\noption is explicitly specified.\n\nSigned-off-by: Rajasi Mandal <rajasimandal@microsoft.com>\n---\n fs/smb/client/fs_context.c | 254 ++++++++++++++++++++++++++++++++++++-\n 1 file changed, 252 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c\nindex b63ec7ab6e51..d90430e7a648 100644\n--- a/fs/smb/client/fs_context.c\n+++ b/fs/smb/client/fs_context.c\n@@ -717,13 +717,13 @@ static int smb3_handle_conflicting_options(struct fs_context *fc)\n \t\t\t\tctx->multichannel = true;\n \t\t\telse\n \t\t\t\tctx->multichannel = false;\n-\t\t} else {\n+\t\t} else if (fc->purpose != FS_CONTEXT_FOR_RECONFIGURE) {\n \t\t\tctx->multichannel = false;\n \t\t\tctx->max_channels = 1;\n \t\t}\n+\t\t/* For reconfigure with neither specified, keep inherited values */\n \t}\n \n-\t//resetting default values as remount doesn't initialize fs_context again\n \tctx->multichannel_specified = false;\n \tctx->max_channels_specified = false;\n \n@@ -921,6 +921,85 @@ static void smb3_fs_context_free(struct fs_context *fc)\n \tsmb3_cleanup_fs_context(ctx);\n }\n \n+/*\n+ * Sync cifs_sb->ctx with the runtime state visible through /proc/mounts.\n+ * cifs_show_options() reads many fields from tcon/server/ses rather than\n+ * from ctx.  On remount, libmount reads /proc/mounts and feeds those\n+ * values back as mount options.  To avoid false mismatches between the\n+ * old ctx and the newly parsed options, we must ensure ctx reflects\n+ * the current runtime state before it is duplicated into the new\n+ * remount context.\n+ *\n+ * Note: sb->s_umount is not yet held when VFS calls init_fs_context()\n+ * for reconfigure, so in theory concurrent I/O paths could read\n+ * cifs_sb->ctx fields (e.g. cifs_symlink_type()) while we write them.\n+ * This is safe because all fields written here are word-sized\n+ * (bool/int/pointer), so stores are architecturally atomic.  The same\n+ * unsynchronized-read pattern already exists in cifs_show_options().\n+ */\n+static void smb3_sync_ctx_from_tcon(struct cifs_sb_info *cifs_sb)\n+{\n+\tstruct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);\n+\tstruct TCP_Server_Info *server = tcon->ses->server;\n+\tstruct cifs_ses *ses = tcon->ses;\n+\tstruct smb3_fs_context *ctx = cifs_sb->ctx;\n+\tconst char *domain;\n+\tint unicode;\n+\n+\t/*\n+\t * Server fields: ops/vals can change during reconnect\n+\t * (renegotiation may upgrade the dialect).  nosharesock can\n+\t * transition false->true if the server sets\n+\t * SMB2_SHAREFLAG_ISOLATED_TRANSPORT during tree connect.\n+\t * Read all under srv_lock to get a consistent snapshot.\n+\t */\n+\tspin_lock(&server->srv_lock);\n+\tctx->ops = server->ops;\n+\tctx->vals = server->vals;\n+\tctx->nosharesock = server->nosharesock;\n+\tspin_unlock(&server->srv_lock);\n+\n+\t/*\n+\t * Tcon fields: posix_extensions, unix_ext, use_persistent and\n+\t * use_resilient are set during tree connect and do not change\n+\t * after that, but read under tc_lock for consistency with the\n+\t * convention that tc_lock protects tcon state.\n+\t */\n+\tspin_lock(&tcon->tc_lock);\n+\tif (tcon->posix_extensions) {\n+\t\tctx->linux_ext = 1;\n+\t\tctx->no_linux_ext = 0;\n+\t} else if (tcon->unix_ext) {\n+\t\tctx->linux_ext = 1;\n+\t\tctx->no_linux_ext = 0;\n+\t} else {\n+\t\tctx->linux_ext = 0;\n+\t\tctx->no_linux_ext = 1;\n+\t}\n+\tif (tcon->use_persistent) {\n+\t\tctx->persistent = true;\n+\t\tctx->nopersistent = false;\n+\t}\n+\tctx->resilient = tcon->use_resilient;\n+\tspin_unlock(&tcon->tc_lock);\n+\n+\t/*\n+\t * Session fields: domainName and unicode are effectively\n+\t * write-once (set during session setup, never freed/replaced\n+\t * while the session exists).  Snapshot them under ses_lock\n+\t * and kstrdup the domain outside the lock.\n+\t */\n+\tspin_lock(&ses->ses_lock);\n+\tdomain = ses->domainName;\n+\tunicode = ses->unicode;\n+\tspin_unlock(&ses->ses_lock);\n+\n+\tif (domain && !ctx->domainname)\n+\t\tctx->domainname = kstrdup(domain, GFP_KERNEL);\n+\tif (unicode >= 0)\n+\t\tctx->unicode = unicode;\n+}\n+\n /*\n  * Compare the old and new proposed context during reconfigure\n  * and check if the changes are compatible.\n@@ -990,6 +1069,143 @@ static int smb3_verify_reconfigure_ctx(struct fs_context *fc,\n \t\tcifs_errorf(fc, \"can not change nbsessinit during remount\\n\");\n \t\treturn -EINVAL;\n \t}\n+\tif (new_ctx->compress != old_ctx->compress) {\n+\t\tcifs_errorf(fc, \"can not change compress during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->noblocksnd != old_ctx->noblocksnd) {\n+\t\tcifs_errorf(fc, \"can not change noblocksend during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->noautotune != old_ctx->noautotune) {\n+\t\tcifs_errorf(fc, \"can not change noautotune during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->no_sparse != old_ctx->no_sparse) {\n+\t\tcifs_errorf(fc, \"can not change nosparse during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->nodelete != old_ctx->nodelete) {\n+\t\tcifs_errorf(fc, \"can not change nodelete during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->cruid_specified &&\n+\t    !uid_eq(new_ctx->cred_uid, old_ctx->cred_uid)) {\n+\t\tcifs_errorf(fc, \"can not change cruid during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->port != old_ctx->port) {\n+\t\tcifs_errorf(fc, \"can not change port during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->min_offload != old_ctx->min_offload) {\n+\t\tcifs_errorf(fc, \"can not change min_enc_offload during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->snapshot_time != old_ctx->snapshot_time) {\n+\t\tcifs_errorf(fc, \"can not change snapshot during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->max_credits != old_ctx->max_credits) {\n+\t\tcifs_errorf(fc, \"can not change max_credits during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->handle_timeout != old_ctx->handle_timeout) {\n+\t\tcifs_errorf(fc, \"can not change handletimeout during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->got_ip &&\n+\t    !cifs_match_ipaddr((struct sockaddr *)&new_ctx->dstaddr,\n+\t\t\t       (struct sockaddr *)&old_ctx->dstaddr)) {\n+\t\tcifs_errorf(fc, \"can not change ip during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (((struct sockaddr *)&new_ctx->srcaddr)->sa_family != AF_UNSPEC &&\n+\t    memcmp(&new_ctx->srcaddr, &old_ctx->srcaddr, sizeof(new_ctx->srcaddr))) {\n+\t\tcifs_errorf(fc, \"can not change srcaddr during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (memcmp(new_ctx->source_rfc1001_name, old_ctx->source_rfc1001_name,\n+\t\t   RFC1001_NAME_LEN)) {\n+\t\tcifs_errorf(fc, \"can not change netbiosname during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (memcmp(new_ctx->target_rfc1001_name, old_ctx->target_rfc1001_name,\n+\t\t   RFC1001_NAME_LEN)) {\n+\t\tcifs_errorf(fc, \"can not change servern during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->got_version &&\n+\t    (new_ctx->ops != old_ctx->ops || new_ctx->vals != old_ctx->vals)) {\n+\t\tcifs_errorf(fc, \"can not change vers during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->witness != old_ctx->witness) {\n+\t\tcifs_errorf(fc, \"can not change witness during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->rootfs != old_ctx->rootfs) {\n+\t\tcifs_errorf(fc, \"can not change rootfs during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->linux_ext != old_ctx->linux_ext ||\n+\t    new_ctx->no_linux_ext != old_ctx->no_linux_ext) {\n+\t\tcifs_errorf(fc, \"can not change unix during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->nocase != old_ctx->nocase) {\n+\t\tcifs_errorf(fc, \"can not change nocase during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->intr != old_ctx->intr) {\n+\t\tcifs_errorf(fc, \"can not change intr during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->no_psx_acl != old_ctx->no_psx_acl) {\n+\t\tcifs_errorf(fc, \"can not change acl during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->local_lease != old_ctx->local_lease) {\n+\t\tcifs_errorf(fc, \"can not change locallease during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->sign != old_ctx->sign) {\n+\t\tcifs_errorf(fc, \"can not change sign during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->ignore_signature != old_ctx->ignore_signature) {\n+\t\tcifs_errorf(fc, \"can not change ignore_signature during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->seal != old_ctx->seal) {\n+\t\tcifs_errorf(fc, \"can not change seal during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->nosharesock != old_ctx->nosharesock) {\n+\t\tcifs_errorf(fc, \"can not change nosharesock during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->persistent != old_ctx->persistent ||\n+\t    new_ctx->nopersistent != old_ctx->nopersistent) {\n+\t\tcifs_errorf(fc, \"can not change persistenthandles during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->resilient != old_ctx->resilient) {\n+\t\tcifs_errorf(fc, \"can not change resilienthandles during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->sockopt_tcp_nodelay != old_ctx->sockopt_tcp_nodelay) {\n+\t\tcifs_errorf(fc, \"can not change tcpnodelay during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->domainauto != old_ctx->domainauto) {\n+\t\tcifs_errorf(fc, \"can not change domainauto during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\tif (new_ctx->rdma != old_ctx->rdma) {\n+\t\tcifs_errorf(fc, \"can not change rdma during remount\\n\");\n+\t\treturn -EINVAL;\n+\t}\n \n \treturn 0;\n }\n@@ -1903,6 +2119,40 @@ int smb3_init_fs_context(struct fs_context *fc)\n \tchar *nodename = utsname()->nodename;\n \tint i;\n \n+\t/*\n+\t * For reconfigure (remount), duplicate the existing mount context\n+\t * instead of building one from scratch with init defaults.\n+\t *\n+\t * VFS sets fc->root before calling init_fs_context for reconfigure,\n+\t * so we can access the existing superblock's context.  We first sync\n+\t * cifs_sb->ctx with runtime state (tcon/server/ses) so that ctx\n+\t * matches what cifs_show_options() displays.  Then we dup old_ctx\n+\t * into new_ctx.  The parser will overwrite only the options\n+\t * explicitly passed on remount, so any difference between new_ctx\n+\t * and old_ctx in smb3_verify_reconfigure_ctx() represents a real,\n+\t * intentional change by the user.\n+\t */\n+\tif (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) {\n+\t\tstruct cifs_sb_info *cifs_sb = CIFS_SB(fc->root->d_sb);\n+\t\tint rc;\n+\n+\t\tsmb3_sync_ctx_from_tcon(cifs_sb);\n+\n+\t\tctx = kzalloc(sizeof(*ctx), GFP_KERNEL);\n+\t\tif (!ctx)\n+\t\t\treturn -ENOMEM;\n+\n+\t\trc = smb3_fs_context_dup(ctx, cifs_sb->ctx);\n+\t\tif (rc) {\n+\t\t\tkfree(ctx);\n+\t\t\treturn rc;\n+\t\t}\n+\n+\t\tfc->fs_private = ctx;\n+\t\tfc->ops = &smb3_fs_context_ops;\n+\t\treturn 0;\n+\t}\n+\n \tctx = kzalloc_obj(struct smb3_fs_context);\n \tif (unlikely(!ctx))\n \t\treturn -ENOMEM;\n",
    "prefixes": [
        "v2",
        "1/8"
    ]
}