get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230445,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230445/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260429-case-sensitivity-v12-13-8057123bebe0@oracle.com/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/8/?format=api",
        "name": "Linux ext4 filesystem development",
        "link_name": "linux-ext4",
        "list_id": "linux-ext4.vger.kernel.org",
        "list_email": "linux-ext4@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260429-case-sensitivity-v12-13-8057123bebe0@oracle.com>",
    "date": "2026-04-29T18:07:24",
    "name": "[v12,13/15] nfsd: Report export case-folding via NFSv3 PATHCONF",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c62f7e67568bf9a425a1ab7d4873d4e3eabb5b9b",
    "submitter": {
        "id": 86689,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/86689/?format=api",
        "name": "Chuck Lever",
        "email": "cel@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260429-case-sensitivity-v12-13-8057123bebe0@oracle.com/mbox/",
    "series": [
        {
            "id": 502125,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502125/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=502125",
            "date": "2026-04-29T18:07:11",
            "name": "Exposing case folding behavior",
            "version": 12,
            "mbox": "http://patchwork.ozlabs.org/series/502125/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230445/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230445/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <SRS0=x9Lt=C4=vger.kernel.org=linux-ext4+bounces-16241-patchwork-incoming=ozlabs.org@ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-ext4@vger.kernel.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "patchwork-incoming@ozlabs.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=avPaysqo;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=x9lt=c4=vger.kernel.org=linux-ext4+bounces-16241-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=\"2600:3c04:e001:36c::12fc:5321\"\n arc.chain=subspace.kernel.org",
            "gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org",
            "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=avPaysqo;\n\tdkim-atps=neutral",
            "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16241-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"avPaysqo\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "Received": [
            "from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5QPp0296z1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 04:12:30 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g5QPn6g8pz4w9R\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 04:12:29 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4g5QPn6c66z4wLX; Thu, 30 Apr 2026 04:12:29 +1000 (AEST)",
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4g5QPk2g40z4w9R\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 30 Apr 2026 04:12:26 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id D06BF3085A94\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 29 Apr 2026 18:08:51 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4147541B35D;\n\tWed, 29 Apr 2026 18:08:01 +0000 (UTC)",
            "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id F38A43FF89E;\n\tWed, 29 Apr 2026 18:08:00 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 5290BC19425;\n\tWed, 29 Apr 2026 18:07:58 +0000 (UTC)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1777486349; cv=pass;\n\tb=QnBn+0vEaS3+9tR+N7vMIqGZExAPddVrAu/QSm3jgHlYk/AIxxBUXpTOe3jtBBHT+/hUPNYjHYvv4Gt4DIK5aEE7H/NFlu5eHc4tHRy5HT3REWSO3vMlqn3EE1dHRyhMgYx3QO+M/0h5RP3uQ7vPgPDNZlEs9XqcicWmkZZ50ndZEcbNkcfvgDjiQwTfL8yqSsOTIyKcxk29NVyM9fLMsEG6g043wXKgRsF2a6SNqqvXrXYq7IPj4u1HuC7mR7UpC27sIiv5YQHckEItReYiBvYZ33KYQKfyY9wEdN+DYFO6fTYyyNMjQ/JJJ0Axi14YcBIaDVMbAR+QzRGUQn7jMQ==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777486081; cv=none;\n b=fdoGNi5OiK//RCG+r8cmq2tzcPBc6Pn9VIiWz1K1GoPP4KeIrxuMsFXo5/oL8FkdNePgOVrZp2xcG4L/arzpQWungZE3R3X/dfOBVLtxGNN+/+Njek/nGKMTjKal/FtGWkPfensWyiS04JEVZJ7aFoGQXrhyVhcsmQ9qxUBDtQg="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1777486349; c=relaxed/relaxed;\n\tbh=2AEP9O5C+wGD/VzCN2MxMtSMJFoCS+lNtDu8JCkn63I=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=c/26oGRbKSC2cqoP8wbfYcY7F8MWYVSppZjqLM6YK6F0vMRwLmmxmu2jGle5YBK7gvATEkRgY6nS1/JnQ2Y7UsRCrj0fe/taQ9lyf0KUAJFV74w17wfR6110oVXllli5Q5ydjuEbay0UbnZkoBt+bN74XnjpdIPOs8tMbwKPQMM7tTaaWOmY4buC9nB6Gx9NY/se7YCCInDTEp9Dmhli/uyg0OzN4s4x/ZVsA127ZsYRp0az4JojVbt9EKivHRGdLF0GkqPjSZ+jgLRdxijrXZ8/MJ1f3152mJCTCtJyIzt8QVGWYZflLXniSfFUCLFIMKw8yc+sXjfFrA0TQUfE3A==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777486081; c=relaxed/simple;\n\tbh=3ibEXRs6ZqvvbnwWfb9g39rNFPAvDiuuC7ysYxFiMFU=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=hI80LpHfW2EBHaFlwNwgFflwjvOPqjvqr3FvCFSROy2FPeamCS2Yy40v0hz14j6pEoDxrag4jKZg7mCLCoMWKbi3pj5xWoZ32m25spMO0cPjKRCvqw7dt/nHceBR+No7LpEdxHeMmQlDyWesHHM9+YeVK64/palCaLUuaM60+EQ="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=avPaysqo; dkim-atps=neutral;\n spf=pass (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16241-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=avPaysqo; arc=none smtp.client-ip=10.30.226.201"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777486080;\n\tbh=3ibEXRs6ZqvvbnwWfb9g39rNFPAvDiuuC7ysYxFiMFU=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=avPaysqoEqIPCzZCnl6ij89BiLHf1e+VaFwQMtv3iz7PwPXJ2F7caCqxbNmIItpZC\n\t NyUkMf0z0v/JKnu3IgN8M0X4bSaMoZmJHHd4RgVROqOKVWOXXUgqT44nGGU9MymVyR\n\t MzU7hfeha6I8cvsS8F4wx1n2QwEJeJ8+Xi1EP0q6KY1v2Fl5IVqge69y9c+gFCn8uz\n\t bkg/AhDwaHsCeNwZo0xzVFwcMkHqMrXuqzv81td6fPM0ZeQwiuwZpr+N0bmWmTYlfJ\n\t 4JOSZap4WyeGApeDeTWUBn+AytkjWPPqiVTlmPCMu8w9lQ4UYsjB9tmTGkYhXCCo1v\n\t JECjOCsojZl3w==",
        "From": "Chuck Lever <cel@kernel.org>",
        "Date": "Wed, 29 Apr 2026 14:07:24 -0400",
        "Subject": "[PATCH v12 13/15] nfsd: Report export case-folding via NFSv3\n PATHCONF",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-ext4@vger.kernel.org",
        "List-Id": "<linux-ext4.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-ext4+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-ext4+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260429-case-sensitivity-v12-13-8057123bebe0@oracle.com>",
        "References": "<20260429-case-sensitivity-v12-0-8057123bebe0@oracle.com>",
        "In-Reply-To": "<20260429-case-sensitivity-v12-0-8057123bebe0@oracle.com>",
        "To": "Al Viro <viro@zeniv.linux.org.uk>,\n Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>",
        "Cc": "linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,\n linux-xfs@vger.kernel.org, linux-cifs@vger.kernel.org,\n linux-nfs@vger.kernel.org, linux-api@vger.kernel.org,\n linux-f2fs-devel@lists.sourceforge.net, hirofumi@mail.parknet.co.jp,\n linkinjeon@kernel.org, sj1557.seo@samsung.com, yuezhang.mo@sony.com,\n almaz.alexandrovich@paragon-software.com, slava@dubeyko.com,\n glaubitz@physik.fu-berlin.de, frank.li@vivo.com, tytso@mit.edu,\n adilger.kernel@dilger.ca, cem@kernel.org, sfrench@samba.org,\n pc@manguebit.org, ronniesahlberg@gmail.com, sprasad@microsoft.com,\n trondmy@kernel.org, anna@kernel.org, jaegeuk@kernel.org, chao@kernel.org,\n hansg@kernel.org, senozhatsky@chromium.org,\n Chuck Lever <chuck.lever@oracle.com>,\n Roland Mainz <roland.mainz@nrubsig.org>",
        "X-Mailer": "b4 0.16-dev",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=6586;\n i=chuck.lever@oracle.com; h=from:subject:message-id;\n bh=IpXstYLd1S+g4AYnnCs2sKNY6pmlFdt467tqNXA8Pt4=;\n b=owEBbQKS/ZANAwAKATNqszNvZn+XAcsmYgBp8kjdByccVEcEEBgQ8M2KviDpwfaOt8WgIOkww\n rIDrOpjY0aJAjMEAAEKAB0WIQQosuWwEobfJDzyPv4zarMzb2Z/lwUCafJI3QAKCRAzarMzb2Z/\n l7ddD/98CaYLuxipMbpe2ovAbP1yoj4kQpytu6hqH+62Yz7nNilpadWnIi4+mfXdyzFaEdt5p2S\n Itv/hOQLIgiX6VegXIUonQ3NlXL4JyNnnGKgAuixXFDE+cW76qHTXQQKeQnu+LpFSvGYr1IWxhS\n hnyaIW/lhxhmXoU5df/F/tR8dTFV1JLUqDBxMriUTBuNhXu+bx7Xi7b6QUeCaKL/4WPlFiujTEq\n plNyVFIk2dMEmBNf0H07QLO6XTzVvspi2wcwf5iXpvaH7pie0QuRH3BFTQ4MlqEEBJuuuIdg9hP\n X9TaWGkmIh2mNY1OQ9qCZX9rexnANVFCO469cm7fYVu3DRNONsrcsgqD1rzo0OhUzz55WT9ldIT\n nT0b/ConxQGMhscbm1pCJgv/IiNnZgE57Ygns3ajQwre1UUW1X0tfbMz34VkoxqZMN7CnWp2f+o\n UM0XOmHJm8Qs8Va99zevK/KYTwvG5x0ngTGAfsLdV5W4xEL4UQ0E3/JSyg0bK4rkqRqK40WtZO5\n D7O9jiAcKSnJ0AOmwZzM4U6BUGdEfO2hNTbli9ZU+sSWpOzS9A6I+ysEFiPN6pNWNCFbSr58F3k\n ZyeM5hx9Scq7EkJa/HLs8JXOugEVrbNPNjeYfkupNtXGjz3HwHkKVIl3ZzPv0VcNRpbHGYKUwzg\n JTEtS+s5vy2AR4A==",
        "X-Developer-Key": "i=chuck.lever@oracle.com; a=openpgp;\n fpr=28B2E5B01286DF243CF23EFE336AB3336F667F97",
        "X-Spam-Status": "No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1",
        "X-Spam-Checker-Version": "SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"
    },
    "content": "From: Chuck Lever <chuck.lever@oracle.com>\n\nThe hard-coded MSDOS_SUPER_MAGIC check in nfsd3_proc_pathconf()\nonly recognizes FAT filesystems as case-insensitive. Modern\nfilesystems like F2FS, exFAT, and CIFS support case-insensitive\ndirectories, but NFSv3 clients cannot discover this capability.\n\nQuery the export's actual case behavior through ->fileattr_get\ninstead. This allows NFSv3 clients to correctly handle case\nsensitivity for any filesystem that implements the fileattr\ninterface. Filesystems without ->fileattr_get continue to report\nthe default POSIX behavior (case-sensitive, case-preserving).\n\nThis change depends on the earlier \"fat: Implement fileattr_get\nfor case sensitivity\" patch in this series, which ensures FAT\nfilesystems report their case behavior correctly via the\nfileattr interface.\n\nReviewed-by: Roland Mainz <roland.mainz@nrubsig.org>\nSigned-off-by: Chuck Lever <chuck.lever@oracle.com>\n---\n fs/nfsd/nfs3proc.c | 36 +++++++++++++++++++++------\n fs/nfsd/vfs.c      | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++\n fs/nfsd/vfs.h      |  3 +++\n fs/nfsd/xdr3.h     |  4 +--\n 4 files changed, 105 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c\nindex 42adc5461db0..62ebc65b8af2 100644\n--- a/fs/nfsd/nfs3proc.c\n+++ b/fs/nfsd/nfs3proc.c\n@@ -710,23 +710,43 @@ nfsd3_proc_pathconf(struct svc_rqst *rqstp)\n \tresp->p_name_max = 255;\t\t/* at least */\n \tresp->p_no_trunc = 0;\n \tresp->p_chown_restricted = 1;\n-\tresp->p_case_insensitive = 0;\n-\tresp->p_case_preserving = 1;\n+\tresp->p_case_insensitive = false;\n+\tresp->p_case_preserving = true;\n \n \tresp->status = fh_verify(rqstp, &argp->fh, 0, NFSD_MAY_NOP);\n \n \tif (resp->status == nfs_ok) {\n \t\tstruct super_block *sb = argp->fh.fh_dentry->d_sb;\n+\t\tint err;\n \n-\t\t/* Note that we don't care for remote fs's here */\n-\t\tswitch (sb->s_magic) {\n-\t\tcase EXT2_SUPER_MAGIC:\n+\t\tif (sb->s_magic == EXT2_SUPER_MAGIC) {\n \t\t\tresp->p_link_max = EXT2_LINK_MAX;\n \t\t\tresp->p_name_max = EXT2_NAME_LEN;\n+\t\t}\n+\n+\t\terr = nfsd_get_case_info(argp->fh.fh_dentry,\n+\t\t\t\t\t &resp->p_case_insensitive,\n+\t\t\t\t\t &resp->p_case_preserving);\n+\t\t/*  \n+\t\t * RFC 1813 lists NFS3ERR_STALE, NFS3ERR_BADHANDLE, and\n+\t\t * NFS3ERR_SERVERFAULT as the only PATHCONF errors.\n+\t\t */\n+\t\tswitch (err) {\n+\t\tcase 0:\n+\t\tcase -EOPNOTSUPP:\n+\t\t\t/* Both arms leave the output booleans valid. */\n \t\t\tbreak;\n-\t\tcase MSDOS_SUPER_MAGIC:\n-\t\t\tresp->p_case_insensitive = 1;\n-\t\t\tresp->p_case_preserving  = 0;\n+\t\tcase -EACCES:\n+\t\tcase -EPERM:\n+\t\t\t/*\n+\t\t\t * Policy denied the query. Report STALE so the\n+\t\t\t * handle is unusable without implying a server\n+\t\t\t * malfunction.\n+\t\t\t */\n+\t\t\tresp->status = nfserr_stale;\n+\t\t\tbreak;\n+\t\tdefault:\n+\t\t\tresp->status = nfserr_serverfault;\n \t\t\tbreak;\n \t\t}\n \t}\ndiff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c\nindex eafdf7b7890f..4bd63d8efbf7 100644\n--- a/fs/nfsd/vfs.c\n+++ b/fs/nfsd/vfs.c\n@@ -32,6 +32,7 @@\n #include <linux/writeback.h>\n #include <linux/security.h>\n #include <linux/sunrpc/xdr.h>\n+#include <linux/fileattr.h>\n \n #include \"xdr3.h\"\n \n@@ -2891,3 +2892,74 @@ nfsd_permission(struct svc_cred *cred, struct svc_export *exp,\n \n \treturn err? nfserrno(err) : 0;\n }\n+\n+/**\n+ * nfsd_get_case_info - get case sensitivity info for a dentry\n+ * @dentry: dentry to query\n+ * @case_insensitive: set to true if the filesystem is case-insensitive\n+ * @case_preserving: set to true if the filesystem preserves case\n+ *\n+ * On casefold-capable filesystems the flag lives on the directory,\n+ * not on its entries, so for a non-directory @dentry the parent is\n+ * queried instead. A directory (including an export root, whose\n+ * parent lies outside the export) is queried as-is so its own\n+ * contents' lookup behavior is reported.\n+ *\n+ * When the filesystem does not expose case-folding state (no\n+ * ->fileattr_get, or the callback returns -EOPNOTSUPP /\n+ * -ENOIOCTLCMD / -ENOTTY / -EINVAL), the outputs are filled with\n+ * POSIX defaults (case-sensitive, case-preserving) on the premise\n+ * that a filesystem with case-folding support wires up\n+ * fileattr_get.\n+ *\n+ * Other errors propagate unmodified (-EACCES, -EPERM from LSM\n+ * hooks; -EIO, -ESTALE, ... from the filesystem). Case-folding\n+ * behavior is a property of the exported filesystem, not of the\n+ * caller's credentials, so silently substituting defaults would\n+ * let the same dentry report POSIX while LSM denies and report\n+ * casefolding once LSM allows -- a client could race against\n+ * silent name collisions on a case-insensitive export.\n+ *\n+ * Return: 0 with outputs filled, -EOPNOTSUPP with outputs filled\n+ *         to POSIX defaults, or a negative errno with outputs\n+ *         unmodified.\n+ */\n+int\n+nfsd_get_case_info(struct dentry *dentry, bool *case_insensitive,\n+\t\t   bool *case_preserving)\n+{\n+\tstruct file_kattr fa = {};\n+\tstruct dentry *cd;\n+\tbool put = false;\n+\tint err;\n+\n+\tif (d_is_dir(dentry)) {\n+\t\tcd = dentry;\n+\t} else {\n+\t\tcd = dget_parent(dentry);\n+\t\tput = true;\n+\t}\n+\terr = vfs_fileattr_get(cd, &fa);\n+\tif (put)\n+\t\tdput(cd);\n+\tswitch (err) {\n+\tcase 0:\n+\t\t*case_insensitive = fa.fsx_xflags & FS_XFLAG_CASEFOLD;\n+\t\t*case_preserving =\n+\t\t\t!(fa.fsx_xflags & FS_XFLAG_CASENONPRESERVING);\n+\t\treturn 0;\n+\tcase -EINVAL:\n+\tcase -ENOTTY:\n+\tcase -ENOIOCTLCMD:\n+\tcase -EOPNOTSUPP:\n+\t\t/*\n+\t\t * Filesystem does not expose case state.\n+\t\t * Report POSIX defaults.\n+\t\t */\n+\t\t*case_insensitive = false;\n+\t\t*case_preserving = true;\n+\t\treturn -EOPNOTSUPP;\n+\tdefault:\n+\t\treturn err;\n+\t}\n+}\ndiff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h\nindex 702a844f2106..e09ea04a51b9 100644\n--- a/fs/nfsd/vfs.h\n+++ b/fs/nfsd/vfs.h\n@@ -156,6 +156,9 @@ __be32\t\tnfsd_readdir(struct svc_rqst *, struct svc_fh *,\n \t\t\t     loff_t *, struct readdir_cd *, nfsd_filldir_t);\n __be32\t\tnfsd_statfs(struct svc_rqst *, struct svc_fh *,\n \t\t\t\tstruct kstatfs *, int access);\n+int\t\tnfsd_get_case_info(struct dentry *dentry,\n+\t\t\t\t   bool *case_insensitive,\n+\t\t\t\t   bool *case_preserving);\n \n __be32\t\tnfsd_permission(struct svc_cred *cred, struct svc_export *exp,\n \t\t\t\tstruct dentry *dentry, int acc);\ndiff --git a/fs/nfsd/xdr3.h b/fs/nfsd/xdr3.h\nindex 522067b7fd75..a7c9714b0b0e 100644\n--- a/fs/nfsd/xdr3.h\n+++ b/fs/nfsd/xdr3.h\n@@ -209,8 +209,8 @@ struct nfsd3_pathconfres {\n \t__u32\t\t\tp_name_max;\n \t__u32\t\t\tp_no_trunc;\n \t__u32\t\t\tp_chown_restricted;\n-\t__u32\t\t\tp_case_insensitive;\n-\t__u32\t\t\tp_case_preserving;\n+\tbool\t\t\tp_case_insensitive;\n+\tbool\t\t\tp_case_preserving;\n };\n \n struct nfsd3_commitres {\n",
    "prefixes": [
        "v12",
        "13/15"
    ]
}