get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223369,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2223369/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260415071812.1139054-3-dmantipov@yandex.ru/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260415071812.1139054-3-dmantipov@yandex.ru>",
    "list_archive_url": null,
    "date": "2026-04-15T07:18:12",
    "name": "[v5,3/3] ubifs: avoid redundant calls to memset()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "58cfcf44c85c37669c1c494370fa3c901f5f48e6",
    "submitter": {
        "id": 87610,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/87610/?format=api",
        "name": "Dmitry Antipov",
        "email": "dmantipov@yandex.ru"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260415071812.1139054-3-dmantipov@yandex.ru/mbox/",
    "series": [
        {
            "id": 499932,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499932/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=499932",
            "date": "2026-04-15T07:18:11",
            "name": "[v5,1/3] ubifs: prefer kstrtobool_from_user() over custom helper",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/499932/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223369/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223369/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=AhrLiliW;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=yandex.ru header.i=@yandex.ru header.a=rsa-sha256\n header.s=mail header.b=McCB1ay9;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)",
            "\n mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net;\n dkim=pass header.i=@yandex.ru"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4fwXZS2FVNz1yHd\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 17:19:12 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wCuWY-00000000hw8-2xsV;\n\tWed, 15 Apr 2026 07:18:58 +0000",
            "from forward100a.mail.yandex.net ([178.154.239.83])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wCuWU-00000000huQ-1ukk\n\tfor linux-mtd@lists.infradead.org;\n\tWed, 15 Apr 2026 07:18:56 +0000",
            "from mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net\n (mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net\n [IPv6:2a02:6b8:c0c:489d:0:640:baa6:0])\n\tby forward100a.mail.yandex.net (Yandex) with ESMTPS id 70DF2C03CB;\n\tWed, 15 Apr 2026 10:18:49 +0300 (MSK)",
            "by mail-nwsmtp-smtp-production-main-59.iva.yp-c.yandex.net\n (smtp/Yandex) with ESMTPSA id kIGRDIAS44Y0-MAfZTJRm;\n\tWed, 15 Apr 2026 10:18:48 +0300"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=ZrngAi5WsyDaLzJWIBqXRHK5It59GO9Uzd/Kxk2WOBE=; b=AhrLiliW5Xg1Fj\n\tBDvO9x+UYkaIUTOwr+2GN32kayp8o4ZRd1eZ5BtebZPW5HI7WAn/8awbCttq/bK5pSwOXrHiWseyY\n\tkDE8IcspE3E+kphogK4FUKTXYdlF/puO2XShtmJpQ0KpaDCIVcdacjXOTcdhpJvJU/59FO56CxhPe\n\tj245XkukhRWQK/A2cGBdAO8TdstebvSYGWGBihHtydxRLGq86OUQiJlXX44I1+GdcZ2juTkQYxCM1\n\t7ivzTfjUxbNHcJxpbkLjg7C40+nmtedObX1+lugRXXmOT8MXgSLAorypFrKbOIHihBUPy1BLkuEtA\n\tzfGxuZRvvXsfKaiaEdYw==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail;\n\tt=1776237528; bh=xJhGyuKJG1TrBNLiB9oLeQRJIGjE67W01CzbqBVp378=;\n\th=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From;\n\tb=McCB1ay9ucM0StT0c2SEyKlCH8m8iJWcBy8bCJ5WEbZ8WGOUOpxKpig1lRhNpfxr4\n\t s+6FURpeEJy5VETSIO8Sn41GuFtOEiyGMAJ02OzYqyjyfPQXrBJoawyok/LwvRuprC\n\t /I83ttEb8rYKjpIL94WGgUSm5qqc88fKI25ttOoA="
        ],
        "X-Yandex-Fwd": "1",
        "From": "Dmitry Antipov <dmantipov@yandex.ru>",
        "To": "Zhihao Cheng <chengzhihao1@huawei.com>,\n\tRichard Weinberger <richard@nod.at>",
        "Cc": "linux-mtd@lists.infradead.org,\n\tDmitry Antipov <dmantipov@yandex.ru>",
        "Subject": "[PATCH v5 3/3] ubifs: avoid redundant calls to memset()",
        "Date": "Wed, 15 Apr 2026 10:18:12 +0300",
        "Message-ID": "<20260415071812.1139054-3-dmantipov@yandex.ru>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260415071812.1139054-1-dmantipov@yandex.ru>",
        "References": "<20260415071812.1139054-1-dmantipov@yandex.ru>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260415_001854_733289_A2A198E3 ",
        "X-CRM114-Status": "GOOD (  14.36  )",
        "X-Spam-Score": "-2.1 (--)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  Rely on partial implicit initialization of 'struct\n ubifs_budget_req'\n    objects and so simplify 'ubifs_release_dirty_inode_budget()',\n 'do_rename()'\n    and 'do_truncation()' by dropping explicit calls to 'me [...]\n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                         [178.154.239.83 listed in\n sa-trusted.bondedsender.org]\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [178.154.239.83 listed in sa-accredit.habeas.com]\n  0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)\n                             [178.154.239.83 listed in wl.mailspike.net]\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                            [178.154.239.83 listed in\n bl.score.senderscore.com]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail\n provider\n                             [dmantipov(at)yandex.ru]",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Rely on partial implicit initialization of 'struct ubifs_budget_req'\nobjects and so simplify 'ubifs_release_dirty_inode_budget()', 'do_rename()'\nand 'do_truncation()' by dropping explicit calls to 'memset()'.\n\nSigned-off-by: Dmitry Antipov <dmantipov@yandex.ru>\n---\nv5: initial version to join the series\n---\n fs/ubifs/budget.c |  9 ++++-----\n fs/ubifs/dir.c    |  4 +---\n fs/ubifs/file.c   | 10 +++++-----\n 3 files changed, 10 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c\nindex d76eb7b39f56..a73f1e969f7c 100644\n--- a/fs/ubifs/budget.c\n+++ b/fs/ubifs/budget.c\n@@ -590,11 +590,10 @@ void ubifs_convert_page_budget(struct ubifs_info *c)\n void ubifs_release_dirty_inode_budget(struct ubifs_info *c,\n \t\t\t\t      struct ubifs_inode *ui)\n {\n-\tstruct ubifs_budget_req req;\n-\n-\tmemset(&req, 0, sizeof(struct ubifs_budget_req));\n-\t/* The \"no space\" flags will be cleared because dd_growth is > 0 */\n-\treq.dd_growth = c->bi.inode_budget + ALIGN(ui->data_len, 8);\n+\tstruct ubifs_budget_req req = {\n+\t\t/* The \"no space\" flags will be cleared because dd_growth is > 0 */\n+\t\t.dd_growth = c->bi.inode_budget + ALIGN(ui->data_len, 8)\n+\t};\n \tubifs_release_budget(c, &req);\n }\n \ndiff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c\nindex 86d41e077e4d..c1602e8aff01 100644\n--- a/fs/ubifs/dir.c\n+++ b/fs/ubifs/dir.c\n@@ -1335,7 +1335,7 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry,\n \t\t\t\t\t.dirtied_ino = 3 };\n \tstruct ubifs_budget_req ino_req = { .dirtied_ino = 1,\n \t\t\t.dirtied_ino_d = ALIGN(old_inode_ui->data_len, 8) };\n-\tstruct ubifs_budget_req wht_req;\n+\tstruct ubifs_budget_req wht_req = { .new_ino = 1 };\n \tunsigned int saved_nlink;\n \tstruct fscrypt_name old_nm, new_nm;\n \n@@ -1422,8 +1422,6 @@ static int do_rename(struct inode *old_dir, struct dentry *old_dentry,\n \t\twhiteout_ui->data_len = ubifs_encode_dev(dev, MKDEV(0, 0));\n \t\tubifs_assert(c, !whiteout_ui->dirty);\n \n-\t\tmemset(&wht_req, 0, sizeof(struct ubifs_budget_req));\n-\t\twht_req.new_ino = 1;\n \t\twht_req.new_ino_d = ALIGN(whiteout_ui->data_len, 8);\n \t\t/*\n \t\t * To avoid deadlock between space budget (holds ui_mutex and\ndiff --git a/fs/ubifs/file.c b/fs/ubifs/file.c\nindex e73c28b12f97..35061a587e3c 100644\n--- a/fs/ubifs/file.c\n+++ b/fs/ubifs/file.c\n@@ -1101,13 +1101,16 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode,\n \t\t\t const struct iattr *attr)\n {\n \tint err;\n-\tstruct ubifs_budget_req req;\n+\tstruct ubifs_budget_req req = {\n+\t\t.dirtied_ino = 1,\n+\t\t/* A funny way to budget for truncation node */\n+\t\t.dirtied_ino_d = UBIFS_TRUN_NODE_SZ\n+\t};\n \tloff_t old_size = inode->i_size, new_size = attr->ia_size;\n \tint offset = new_size & (UBIFS_BLOCK_SIZE - 1), budgeted = 1;\n \tstruct ubifs_inode *ui = ubifs_inode(inode);\n \n \tdbg_gen(\"ino %llu, size %lld -> %lld\", inode->i_ino, old_size, new_size);\n-\tmemset(&req, 0, sizeof(struct ubifs_budget_req));\n \n \t/*\n \t * If this is truncation to a smaller size, and we do not truncate on a\n@@ -1117,9 +1120,6 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode,\n \tif (new_size & (UBIFS_BLOCK_SIZE - 1))\n \t\treq.dirtied_page = 1;\n \n-\treq.dirtied_ino = 1;\n-\t/* A funny way to budget for truncation node */\n-\treq.dirtied_ino_d = UBIFS_TRUN_NODE_SZ;\n \terr = ubifs_budget_space(c, &req);\n \tif (err) {\n \t\t/*\n",
    "prefixes": [
        "v5",
        "3/3"
    ]
}