get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231577,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231577/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177758363658.1314717.5258534978153146037.stgit@frogsfrogsfrogs/",
    "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": "<177758363658.1314717.5258534978153146037.stgit@frogsfrogsfrogs>",
    "date": "2026-04-30T21:16:51",
    "name": "[07/13] util: fix checkpatch complaints in fuser_conf.[ch]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1d1ab6b6bd1d8e5c75a0e58fb189490b60415144",
    "submitter": {
        "id": 77032,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/77032/?format=api",
        "name": "Darrick J. Wong",
        "email": "djwong@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/177758363658.1314717.5258534978153146037.stgit@frogsfrogsfrogs/mbox/",
    "series": [
        {
            "id": 502386,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502386/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=502386",
            "date": "2026-04-30T21:15:17",
            "name": "[01/13] Refactor mount code / move common functions to mount_util.c",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502386/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231577/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231577/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <SRS0=JHXN=C5=vger.kernel.org=linux-ext4+bounces-16259-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=nDQKHARm;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org;\n envelope-from=srs0=jhxn=c5=vger.kernel.org=linux-ext4+bounces-16259-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=nDQKHARm;\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-16259-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=\"nDQKHARm\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "Received": [
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\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 4g66Wc74TVz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 07:19:56 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g66Wc6YXJz4wck\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 07:19:56 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4g66Wc6T3hz4wc4; Fri, 01 May 2026 07:19:56 +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 4g66WX6FT3z4wck\n\tfor <patchwork-incoming@ozlabs.org>; Fri, 01 May 2026 07:19:52 +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 77A0C303EE9C\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 30 Apr 2026 21:16:55 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 46C323B7767;\n\tThu, 30 Apr 2026 21:16:52 +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 0374D37998B;\n\tThu, 30 Apr 2026 21:16:51 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 98548C2BCB3;\n\tThu, 30 Apr 2026 21:16:51 +0000 (UTC)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1777583996; cv=pass;\n\tb=g/S8u2cNXP8vn37dAp0hXcz+C2owhhez4MCfILIyVXnJm3MZYeTKu24FY+HvnLFMrWmzU+Qw8Jih/n66To9q3ZQWd3GBN1FWqVCx0FOkNdjMfHSLUdDluSYVuBDB+q+PBYOLbKUShhDBvQmiBdFc6bVXmjQBsleMvuJ+zgdgwwQ07Auc/ZZvME86+mBVPB061A1QnwaWoChYLD+zMmWD3+nwBTUdy2BEtuYw1XjJ4CZz8lLuLFc1+GT6Nf/rJQJ4G5YugCwZiefkyKXRdwJJMAbRjrK+m1LlWnKA1IinppZGjARNfdvDNf7zUga8zZSgePl8FDfCzQWK5RSP7ld2VQ==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777583812; cv=none;\n b=JRVy7vU5JVXBT7sVlLX0hfiMkkeUO4CT3UM3Yj3pADhnSWs6bMO6sYnpurfcchPIcAvsQ9lxH/Jm8T3yNOaGwoYEChjuFUy2IH9w2x26tpq/nppwqTfHjOC1jMmCktEWIV1JbmXvhrq2b2xq3E2pkr+g9h7AywOS3ST2fSUIo2g="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1777583996; c=relaxed/relaxed;\n\tbh=wxp3LXapNviG7/Os/g65tj+mKmZ0xZc5lUNFqkpk6u0=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=uAgC7kpXs1OBkXhyhcPl09vj2yrNy96a1RA1zliQ2RdXO/zjAXi95kjh9D7Dib2aMy5NpinEP5Y5OaRJA2oizahbr1fmK0yYYGh2dqUBjhOG8gMEBAtO6/ZmLuTtJ7e+IUHay5BsOcP/9St1hHL45IuNVB4FQjsIv+CFtxnf3eX9lge8xOOa/xiwhdMBQK5BI9/3nwAYHJKxJ9EtXU4OrAeu6l3eM0W0z+e9oATUZDjXiatbf2ivanalmTmdCfnQHQV2Dj6w4W4TH0GMcV4Y+ST4jlvdxwdpnQXzY6VEztVKSX1dYQPeufMoy3nOhS4byXs2+zHZPoyFMEqfK3yoMA==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777583812; c=relaxed/simple;\n\tbh=w1brGK5tRgWmGiJWcBBv6lKY92WBP+QllTbc3cWUYr4=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=jcGf1ZJ8R2OaZd7cQOENFYlKCqTkNM6ZymQ/q9jbHupsVSrABh6vB4vyuOWde7CNeQUsHeVwyQ3jOok91+M43ArIatsJ0xJtaTNUbi93/f/OZ7kR4m/tNDGT9sRAE1pB17RIRchlQE/fFzQwE+b7+DlwcbF7fREMaibjsRA3dt8="
        ],
        "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=nDQKHARm; 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-16259-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=nDQKHARm; 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=1777583811;\n\tbh=w1brGK5tRgWmGiJWcBBv6lKY92WBP+QllTbc3cWUYr4=;\n\th=Date:Subject:From:To:Cc:In-Reply-To:References:From;\n\tb=nDQKHARmbdQlXcy1nne805lNWE1cdK6nS3GFUKGWKij3AeuaM4GoIBFHG75c5zjnU\n\t rbP5iIpVSlB5VO0Ryrm2oJqmYeZ0W8VjkJ92U2fjMoZBXEFASq9zhyqVq356gqk3N6\n\t YcDB8j/l5hD81K0nobidfH24p0rECix0VgEwiQ5ubaT/3VJsfpcfgdF4pKWHWN9bkz\n\t 9cF/nqcpbsmRVHxyDXDUn2jL9UFiiCrpIIs5fGw1y1v+53AGLs0Zpx4gIdE2GjSIc9\n\t RHVNbFDn9GrpcUOF5FMXrw9oK8TzlsEv840QXi9VmUMAPbQW9EeuOA1pewnHMmRmCi\n\t knmxdUvBbgF6w==",
        "Date": "Thu, 30 Apr 2026 14:16:51 -0700",
        "Subject": "[PATCH 07/13] util: fix checkpatch complaints in fuser_conf.[ch]",
        "From": "\"Darrick J. Wong\" <djwong@kernel.org>",
        "To": "bernd@bsbernd.com, djwong@kernel.org",
        "Cc": "linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev,\n linux-ext4@vger.kernel.org, miklos@szeredi.hu, neal@gompa.dev,\n joannelkoong@gmail.com",
        "Message-ID": "<177758363658.1314717.5258534978153146037.stgit@frogsfrogsfrogs>",
        "In-Reply-To": "<177758363484.1314717.11777978893472254088.stgit@frogsfrogsfrogs>",
        "References": "<177758363484.1314717.11777978893472254088.stgit@frogsfrogsfrogs>",
        "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",
        "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: Darrick J. Wong <djwong@kernel.org>\n\nFix the checkpatch complaints because we touched some code.\n\nSigned-off-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n util/fuser_conf.h |    3 ++-\n util/fuser_conf.c |   51 +++++++++++++++++++++++++++++++++------------------\n 2 files changed, 35 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/util/fuser_conf.h b/util/fuser_conf.h\nindex 5afe70709c5152..55ed745c964ed8 100644\n--- a/util/fuser_conf.h\n+++ b/util/fuser_conf.h\n@@ -23,7 +23,8 @@ void unescape(char *buf);\n static inline struct mntent *GETMNTENT(FILE *stream)\n {\n \tstruct mntent *entp = getmntent(stream);\n-\tif(entp != NULL) {\n+\n+\tif (entp != NULL) {\n \t\tunescape(entp->mnt_fsname);\n \t\tunescape(entp->mnt_dir);\n \t\tunescape(entp->mnt_type);\ndiff --git a/util/fuser_conf.c b/util/fuser_conf.c\nindex ad933de9cf7cbf..6553c7f6f929a5 100644\n--- a/util/fuser_conf.c\n+++ b/util/fuser_conf.c\n@@ -30,7 +30,7 @@\n #include <stdint.h>\n #endif\n \n-int user_allow_other = 0;\n+int user_allow_other;\n int mount_max = 1000;\n static uid_t oldfsuid;\n static gid_t oldfsgid;\n@@ -43,25 +43,27 @@ void unescape(char *buf)\n {\n \tchar *src = buf;\n \tchar *dest = buf;\n+\n \twhile (1) {\n \t\tchar *next_src = strchrnul(src, '\\\\');\n \t\tint offset = next_src - src;\n+\n \t\tmemmove(dest, src, offset);\n \t\tsrc = next_src;\n \t\tdest += offset;\n \n-\t\tif(*src == '\\0') {\n+\t\tif (*src == '\\0') {\n \t\t\t*dest = *src;\n \t\t\treturn;\n \t\t}\n \t\tsrc++;\n \n-\t\tif('0' <= src[0] && src[0] < '2' &&\n-\t\t   '0' <= src[1] && src[1] < '8' &&\n-\t\t   '0' <= src[2] && src[2] < '8') {\n+\t\tif ('0' <= src[0] && src[0] < '2' &&\n+\t\t    '0' <= src[1] && src[1] < '8' &&\n+\t\t    '0' <= src[2] && src[2] < '8') {\n \t\t\t*dest++ = (src[0] - '0') << 6\n-\t\t\t        | (src[1] - '0') << 3\n-\t\t\t        | (src[2] - '0') << 0;\n+\t\t\t\t| (src[1] - '0') << 3\n+\t\t\t\t| (src[2] - '0') << 0;\n \t\t\tsrc += 3;\n \t\t} else if (src[0] == '\\\\') {\n \t\t\t*dest++ = '\\\\';\n@@ -79,6 +81,7 @@ static int count_fuse_fs_mtab(const char *progname)\n \tint count = 0;\n \tconst char *mtab = _PATH_MOUNTED;\n \tFILE *fp = setmntent(mtab, \"r\");\n+\n \tif (fp == NULL) {\n \t\tfprintf(stderr, \"%s: failed to open %s: %s\\n\", progname, mtab,\n \t\t\tstrerror(errno));\n@@ -87,7 +90,7 @@ static int count_fuse_fs_mtab(const char *progname)\n \twhile ((entp = GETMNTENT(fp)) != NULL) {\n \t\tif (strcmp(entp->mnt_type, \"fuse\") == 0 ||\n \t\t    strncmp(entp->mnt_type, \"fuse.\", 5) == 0)\n-\t\t\tcount ++;\n+\t\t\tcount++;\n \t}\n \tendmntent(fp);\n \treturn count;\n@@ -169,12 +172,15 @@ int count_fuse_fs(const char *progname)\n static void strip_line(char *line)\n {\n \tchar *s = strchr(line, '#');\n+\n \tif (s != NULL)\n \t\ts[0] = '\\0';\n \tfor (s = line + strlen(line) - 1;\n-\t     s >= line && isspace((unsigned char) *s); s--);\n+\t     s >= line && isspace((unsigned char) *s); s--) {\n+\t}\n \ts[1] = '\\0';\n-\tfor (s = line; isspace((unsigned char) *s); s++);\n+\tfor (s = line; isspace((unsigned char) *s); s++)\n+\t\t; /* empty */\n \tif (s != line)\n \t\tmemmove(line, s, strlen(s)+1);\n }\n@@ -182,11 +188,12 @@ static void strip_line(char *line)\n static void parse_line(const char *line, int linenum, const char *progname)\n {\n \tint tmp;\n+\n \tif (strcmp(line, \"user_allow_other\") == 0)\n \t\tuser_allow_other = 1;\n \telse if (sscanf(line, \"mount_max = %i\", &tmp) == 1)\n \t\tmount_max = tmp;\n-\telse if(line[0])\n+\telse if (line[0])\n \t\tfprintf(stderr,\n \t\t\t\"%s: unknown parameter in %s at line %i: '%s'\\n\",\n \t\t\tprogname, FUSE_CONF, linenum, line);\n@@ -195,10 +202,12 @@ static void parse_line(const char *line, int linenum, const char *progname)\n void read_conf(const char *progname)\n {\n \tFILE *fp = fopen(FUSE_CONF, \"r\");\n+\n \tif (fp != NULL) {\n \t\tint linenum = 1;\n \t\tchar line[256];\n \t\tint isnewline = 1;\n+\n \t\twhile (fgets(line, sizeof(line), fp) != NULL) {\n \t\t\tif (isnewline) {\n \t\t\t\tif (line[strlen(line)-1] == '\\n') {\n@@ -207,16 +216,18 @@ void read_conf(const char *progname)\n \t\t\t\t} else {\n \t\t\t\t\tisnewline = 0;\n \t\t\t\t}\n-\t\t\t} else if(line[strlen(line)-1] == '\\n') {\n-\t\t\t\tfprintf(stderr, \"%s: reading %s: line %i too long\\n\", progname, FUSE_CONF, linenum);\n+\t\t\t} else if (line[strlen(line)-1] == '\\n') {\n+\t\t\t\tfprintf(stderr, \"%s: reading %s: line %i too long\\n\",\n+\t\t\t\t\tprogname, FUSE_CONF, linenum);\n \n \t\t\t\tisnewline = 1;\n \t\t\t}\n \t\t\tif (isnewline)\n-\t\t\t\tlinenum ++;\n+\t\t\t\tlinenum++;\n \t\t}\n \t\tif (!isnewline) {\n-\t\t\tfprintf(stderr, \"%s: reading %s: missing newline at end of file\\n\", progname, FUSE_CONF);\n+\t\t\tfprintf(stderr, \"%s: reading %s: missing newline at end of file\\n\",\n+\t\t\t\tprogname, FUSE_CONF);\n \n \t\t}\n \t\tif (ferror(fp)) {\n@@ -289,6 +300,8 @@ int check_nonroot_dir_access(const char *progname, const char *origmnt,\n \treturn 0;\n }\n \n+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))\n+\n int check_nonroot_fstype(const char *progname, const struct statfs *fs_buf)\n {\n \tsize_t i;\n@@ -298,13 +311,15 @@ int check_nonroot_fstype(const char *progname, const struct statfs *fs_buf)\n \t * able to just put anything we want there.\n \t * Luckily, without allow_other, we can't get other users to actually\n \t * use any fake information we try to put there anyway.\n-\t * Use a whitelist to be safe. */\n+\t * Use a whitelist to be safe.\n+\t */\n \n \t/* Define permitted filesystems for the mount target. This was\n \t * originally the same list as used by the ecryptfs mount helper\n \t * (https://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/utils/mount.ecryptfs_private.c#L225)\n \t * but got expanded as we found more filesystems that needed to be\n-\t * overlaid. */\n+\t * overlaid.\n+\t */\n \ttypeof(fs_buf->f_type) f_type_whitelist[] = {\n \t\t0x61756673 /* AUFS_SUPER_MAGIC */,\n \t\t0x00000187 /* AUTOFS_SUPER_MAGIC */,\n@@ -345,7 +360,7 @@ int check_nonroot_fstype(const char *progname, const struct statfs *fs_buf)\n \t\t0x2FC12FC1 /* ZFS_SUPER_MAGIC */,\n \t\t0x858458f6 /* RAMFS_MAGIC */,\n \t};\n-\tfor (i = 0; i < sizeof(f_type_whitelist)/sizeof(f_type_whitelist[0]); i++) {\n+\tfor (i = 0; i < ARRAY_SIZE(f_type_whitelist); i++) {\n \t\tif (f_type_whitelist[i] == fs_buf->f_type)\n \t\t\treturn 0;\n \t}\n",
    "prefixes": [
        "07/13"
    ]
}