get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222595,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222595/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260413065114.730231-3-409411716@gms.tku.edu.tw/",
    "project": {
        "id": 8,
        "url": "http://patchwork.ozlabs.org/api/1.2/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,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260413065114.730231-3-409411716@gms.tku.edu.tw>",
    "list_archive_url": null,
    "date": "2026-04-13T06:51:14",
    "name": "[v3,2/2] ext4: improve str2hashbuf by processing 4-byte chunks and removing function pointers",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "62d24f6be1eed4019c7454dbf36274c21f849a3f",
    "submitter": {
        "id": 92099,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/92099/?format=api",
        "name": "Guan-Chun Wu",
        "email": "409411716@gms.tku.edu.tw"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260413065114.730231-3-409411716@gms.tku.edu.tw/mbox/",
    "series": [
        {
            "id": 499652,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499652/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=499652",
            "date": "2026-04-13T06:51:13",
            "name": "ext4: add hash Kunit tests and optimize str2hashbuf",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/499652/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222595/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222595/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <SRS0=C28r=CM=vger.kernel.org=linux-ext4+bounces-15803-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=gms-tku-edu-tw.20251104.gappssmtp.com\n header.i=@gms-tku-edu-tw.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=kIVZo7hZ;\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=c28r=cm=vger.kernel.org=linux-ext4+bounces-15803-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=none (p=none dis=none) header.from=gms.tku.edu.tw",
            "gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gms-tku-edu-tw.20251104.gappssmtp.com\n header.i=@gms-tku-edu-tw.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=kIVZo7hZ;\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-15803-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gms-tku-edu-tw.20251104.gappssmtp.com\n header.i=@gms-tku-edu-tw.20251104.gappssmtp.com header.b=\"kIVZo7hZ\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.169",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=gms.tku.edu.tw",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gms.tku.edu.tw"
        ],
        "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 4fvJ453Hl4z1yDG\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 16:52:05 +1000 (AEST)",
            "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4fvJ452pqgz4wHp\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 16:52:05 +1000 (AEST)",
            "by gandalf.ozlabs.org (Postfix)\n\tid 4fvJ452lvrz4wHk; Mon, 13 Apr 2026 16:52:05 +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 4fvJ41669wz4wHx\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 13 Apr 2026 16:52:01 +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 659A030160FD\n\tfor <patchwork-incoming@ozlabs.org>; Mon, 13 Apr 2026 06:51:47 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B6D97392C3A;\n\tMon, 13 Apr 2026 06:51:43 +0000 (UTC)",
            "from mail-pl1-f169.google.com (mail-pl1-f169.google.com\n [209.85.214.169])\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 3AA39392C4C\n\tfor <linux-ext4@vger.kernel.org>; Mon, 13 Apr 2026 06:51:42 +0000 (UTC)",
            "by mail-pl1-f169.google.com with SMTP id\n d9443c01a7336-2ad4d639db3so18986015ad.0\n        for <linux-ext4@vger.kernel.org>;\n Sun, 12 Apr 2026 23:51:42 -0700 (PDT)",
            "from wu-Pro-E500-G6-WS720T..\n ([2001:288:7001:2703:d062:a770:8a34:87a2])\n        by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b2d4dde346sm100107855ad.29.2026.04.12.23.51.39\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Sun, 12 Apr 2026 23:51:41 -0700 (PDT)"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1776063125; cv=pass;\n\tb=VOCvSxYRk3NBIQ7xxMztpCHudC/xZoFinVSC+Bfs3vrQ0XmRpnvbE5f499NYvetDz9h3GKfComtDFUDTa/INLdBlFZR8G86JnZoSM2ja2QrEyB+uPwzI+JMBXJGK3042vwV3Pd9IwWpni3KUmy3gidXXbZTirm3ls/vy/uoySa1QJDEL6r8kRW3dWcDsZh+HJU4ScTFxy+MJgSl11azLyUQ/McjRicyAYUDTFW1w9VtUgfd6/wGIwQ31M3V+Kek8tVtaikK9VjAcM3tGZoP8yQkaiZjWJi/viNB3tooUc7yw/23kzfxlU8RVbyOXnbm9yuab9XExxFSjeLbFzC0R2A==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776063103; cv=none;\n b=p6Y41hzJ/PfCCBCjMSMhkUGt8OQUWrQ/BqnBLCtolRdCZdWPTw1TB0WxGi19UeVMnAF5MrpSB6Yvi01x3bIaJnTND2DN48Vn9pGSm/yh4D3r50kYyi0QQ+i1nuIaauMZIijz9QrF5iu2axYh3Sr8LpbFEVQKguJnQ1PZVqJeOfU="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1776063125; c=relaxed/relaxed;\n\tbh=D4TXFklFQDmQmwxZ0Ud/cdt/UKuliJ1cGjB8R+Go2+M=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=cON70qI9jUhr5OMk7xLW8DXYBiZeLAboCOxgN+5Zn3jwArjfCk2CFIXuJHR0C0s3qON24h3z9NlUb2oVnRk5AXfLY6MEJbVCJNNyBx7ixmSHn4Y2BNxvC+QQomw+UbNu+lT6CQNDHJt1VNKb7portFgtorddHbEnJxfXn8eYLbwK1xnO/E3gA/nqIWwJtu1+/qbnEjgrRpXZ5ScOYGnhIzw/gxHSyXpvESEEXuJXR/NssWFJ783skK+AxdPWBYuSGgkzJ4e2GnfjuT56yENZ+mt4Hu0XFn8HjbkdW2G5NyT++6l/9mtwP0Fiv2wRHM0i6sz404NTyKJmojwE1dFL/g==",
            "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776063103; c=relaxed/simple;\n\tbh=q9+P125CZ549OI7L3wYHYt7w3xleV/ATVK4sTB5jhk8=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version;\n b=S2HRfUP0HOL3kPbS7B/2GaBNH2H2HcjAzPrEzSWS8hA0rvNRlNFE51mpoRHE9re3wJPtgO+xpMVDsJJP7jIZMOzI8Quhx+53Km9Tz2konkhCbDAbvJRFl1vpNsENp93PFtprQdsnWH6b+qUKIJdo0EHwLDR2z+KkwAC+orOcNac="
        ],
        "ARC-Authentication-Results": [
            "i=2; gandalf.ozlabs.org;\n dmarc=none (p=none dis=none) header.from=gms.tku.edu.tw;\n dkim=pass (2048-bit key;\n unprotected) header.d=gms-tku-edu-tw.20251104.gappssmtp.com\n header.i=@gms-tku-edu-tw.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=kIVZo7hZ; 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-15803-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org",
            "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=gms.tku.edu.tw;\n spf=pass smtp.mailfrom=gms.tku.edu.tw;\n dkim=pass (2048-bit key) header.d=gms-tku-edu-tw.20251104.gappssmtp.com\n header.i=@gms-tku-edu-tw.20251104.gappssmtp.com header.b=kIVZo7hZ;\n arc=none smtp.client-ip=209.85.214.169"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gms-tku-edu-tw.20251104.gappssmtp.com; s=20251104; t=1776063101;\n x=1776667901; 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=D4TXFklFQDmQmwxZ0Ud/cdt/UKuliJ1cGjB8R+Go2+M=;\n        b=kIVZo7hZtsxgQ7iDHlkvyYqtoezBnE411i0cky1Hk72TbJnW6Riy+Q8Xy5TYjluytp\n         ztV3xITlC/hKBGNCihdyFFviAHWD6XqnCYO67AY4wlRDXqQhCdh2jdFkBA79aHEp8Gw8\n         PUrcOdn25/LVsQ5oYi7vfZpQNBhOv+u3v2AOBvBtK+h18kQppTx4OelZQITSJBtdl9rn\n         xHcz76k4cVfk39WEUCbRQZAFTv+6PhE3ytFEWsvTRhsYxO5oRQOwngxmzoanr2AVNShs\n         XHoUs+GyN/NwDwG8AhOCuMrtwfCtlCWvsj7jAAXbmGhOXjO27aNbxlAwETL+3x7cqUWS\n         7jWQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776063101; x=1776667901;\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=D4TXFklFQDmQmwxZ0Ud/cdt/UKuliJ1cGjB8R+Go2+M=;\n        b=pCLb9CJ+cOL5T1dHHsFyVL/0VM9m8pr75RcIq5Y/QD4iYQKNenrfseFUX1iv9Vli5L\n         7gtRtVrQvm0KkmDUp5f4SKYBtIsYlokhjGMKj5v7ga8PVw7T6o1EA9oFoqEwzyjQ8waY\n         zvBKUHuDW73TD+kHoBE1l343zE2jtotRsmd8fJi+3eqipKYkAASjcMgUb3DeEr6olp+u\n         Anb94Uia2JUK+ScsRdKchDDetR6LyP7tiHrodPLI+b9/U2GkIg7o6hKT3U4O2q88lvus\n         JXRIWCMk0pJYCfB9Dp3nefI0eH9k+cQBT4iA0AXi1OLhtmh5t7zFmLaTS9EuSOBEbPBJ\n         3GQw==",
        "X-Gm-Message-State": "AOJu0Yxxulopu12mIlVZ9V8I4Bwk0jbPCRa+gvzXQTSiUIUx6w9q+1KH\n\t64ASOEwswSYo1KBE5WEHUyfDBYGJAdu3SxY4rDMgNMezMQZ8X8zHPdqshz/X9LdDvyU=",
        "X-Gm-Gg": "AeBDievpMADLPoSKljCbHtC7pyxqqbttC3j/8URyGwfdh/VYGr7Uva+lYntvmJ9ltOL\n\tEEaWhhrY6hJkKasDUtBfeMl1nD3cipyDf5LBi1xnlXvUcruEub1EaV+/cyPsFxEHbTLq9jBAAq5\n\t9alU1/r4+nf1KtEqyqvO42jiAfNwFzUAqd2qiDpldYPhFSj0eACkLHWW91MMISL5QZtc6g+4plS\n\tZlYs2j+ua3c0jA7gC4i52fPkfPJcoXfjDmWubCHKEJAUuEsCjlYNHbcZmfoJYJPPGTi7LmSgB3s\n\tVpYwmWJY2MUHRpGlcFK8a5jtI4f8NoaN0Wgwr8Bruj4XNuTCZ3Yt/mYusd/l/9d6jgftLF3sqH0\n\t1ATt9qX/XWg9eGTd1gwmRGgenbd6X57+zq56ICpFzDMvEXnSAaRodTxiY/hXFxuW5N2tN3UJzn9\n\tVfLOvsLpR1+r8bIa9FXRkw5MS0aekAD8YyKUiYQ5gUJNow7Gc=",
        "X-Received": "by 2002:a17:903:3886:b0:2b0:6ce3:8f7 with SMTP id\n d9443c01a7336-2b2d5a95db7mr111280365ad.43.1776063101390;\n        Sun, 12 Apr 2026 23:51:41 -0700 (PDT)",
        "From": "Guan-Chun Wu <409411716@gms.tku.edu.tw>",
        "To": "Theodore Ts'o <tytso@mit.edu>,\n\tAndreas Dilger <adilger.kernel@dilger.ca>,\n\tBaokun Li <libaokun@linux.alibaba.com>,\n\tJan Kara <jack@suse.cz>,\n\tOjaswin Mujoo <ojaswin@linux.ibm.com>,\n\tRitesh Harjani <ritesh.list@gmail.com>,\n\tZhang Yi <yi.zhang@huawei.com>",
        "Cc": "linux-ext4@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tedward062254@gmail.com,\n\tvisitorckw@gmail.com,\n\tdavid.laight.linux@gmail.com,\n\tGuan-Chun Wu <409411716@gms.tku.edu.tw>",
        "Subject": "[PATCH v3 2/2] ext4: improve str2hashbuf by processing 4-byte chunks\n and removing function pointers",
        "Date": "Mon, 13 Apr 2026 14:51:14 +0800",
        "Message-Id": "<20260413065114.730231-3-409411716@gms.tku.edu.tw>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260413065114.730231-1-409411716@gms.tku.edu.tw>",
        "References": "<20260413065114.730231-1-409411716@gms.tku.edu.tw>",
        "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-Transfer-Encoding": "8bit",
        "X-Spam-Status": "No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DMARC_MISSING,HEADER_FROM_DIFFERENT_DOMAINS,\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": "The original byte-by-byte implementation with modulo checks is less\nefficient. Refactor str2hashbuf_unsigned() and str2hashbuf_signed()\nto process input in explicit 4-byte chunks instead of using a\nmodulus-based loop to emit words byte by byte.\n\nAdditionally, the use of function pointers for selecting the appropriate\nstr2hashbuf implementation has been removed. Instead, the functions are\ndirectly invoked based on the hash type, eliminating the overhead of\ndynamic function calls.\n\nPerformance test (x86_64, Intel Core i7-10700 @ 2.90GHz, average over 10000\nruns, using kernel module for testing):\n\n    len | orig_s | new_s | orig_u | new_u\n    ----+--------+-------+--------+-------\n      1 |   70   |   71  |   63   |   63\n      8 |   68   |   64  |   64   |   62\n     32 |   75   |   70  |   75   |   63\n     64 |   96   |   71  |  100   |   68\n    255 |  192   |  108  |  187   |   84\n\nThis change improves performance, especially for larger input sizes.\n\nSigned-off-by: Guan-Chun Wu <409411716@gms.tku.edu.tw>\n---\n fs/ext4/hash.c | 64 +++++++++++++++++++++++++++++++++-----------------\n 1 file changed, 42 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c\nindex 48483cd01..c3fb2df44 100644\n--- a/fs/ext4/hash.c\n+++ b/fs/ext4/hash.c\n@@ -9,6 +9,7 @@\n #include <linux/unicode.h>\n #include <linux/compiler.h>\n #include <linux/bitops.h>\n+#include <linux/unaligned.h>\n #include \"ext4.h\"\n \n #define DELTA 0x9E3779B9\n@@ -141,21 +142,28 @@ static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num)\n \tpad = (__u32)len | ((__u32)len << 8);\n \tpad |= pad << 16;\n \n-\tval = pad;\n \tif (len > num*4)\n \t\tlen = num * 4;\n-\tfor (i = 0; i < len; i++) {\n-\t\tval = ((int) scp[i]) + (val << 8);\n-\t\tif ((i % 4) == 3) {\n-\t\t\t*buf++ = val;\n-\t\t\tval = pad;\n-\t\t\tnum--;\n-\t\t}\n+\n+\twhile (len >= 4) {\n+\t\tval = (scp[0] << 24) + (scp[1] << 16) + (scp[2] << 8) + scp[3];\n+\t\t*buf++ = val;\n+\t\tscp += 4;\n+\t\tlen -= 4;\n+\t\tnum--;\n \t}\n+\n+\tval = pad;\n+\n+\tfor (i = 0; i < len; i++)\n+\t\tval = scp[i] + (val << 8);\n+\n \tif (--num >= 0)\n \t\t*buf++ = val;\n+\n \twhile (--num >= 0)\n \t\t*buf++ = pad;\n+\n }\n \n static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num)\n@@ -167,21 +175,28 @@ static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num)\n \tpad = (__u32)len | ((__u32)len << 8);\n \tpad |= pad << 16;\n \n-\tval = pad;\n \tif (len > num*4)\n \t\tlen = num * 4;\n-\tfor (i = 0; i < len; i++) {\n-\t\tval = ((int) ucp[i]) + (val << 8);\n-\t\tif ((i % 4) == 3) {\n-\t\t\t*buf++ = val;\n-\t\t\tval = pad;\n-\t\t\tnum--;\n-\t\t}\n+\n+\twhile (len >= 4) {\n+\t\tval = get_unaligned_be32(ucp);\n+\t\t*buf++ = val;\n+\t\tucp += 4;\n+\t\tlen -= 4;\n+\t\tnum--;\n \t}\n+\n+\tval = pad;\n+\n+\tfor (i = 0; i < len; i++)\n+\t\tval = ucp[i] + (val << 8);\n+\n \tif (--num >= 0)\n \t\t*buf++ = val;\n+\n \twhile (--num >= 0)\n \t\t*buf++ = pad;\n+\n }\n \n /*\n@@ -205,8 +220,7 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len,\n \tconst char\t*p;\n \tint\t\ti;\n \t__u32\t\tin[8], buf[4];\n-\tvoid\t\t(*str2hashbuf)(const char *, int, __u32 *, int) =\n-\t\t\t\tstr2hashbuf_signed;\n+\tbool use_unsigned = false;\n \n \t/* Initialize the default seed for the hash checksum functions */\n \tbuf[0] = 0x67452301;\n@@ -232,12 +246,15 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len,\n \t\thash = dx_hack_hash_signed(name, len);\n \t\tbreak;\n \tcase DX_HASH_HALF_MD4_UNSIGNED:\n-\t\tstr2hashbuf = str2hashbuf_unsigned;\n+\t\tuse_unsigned = true;\n \t\tfallthrough;\n \tcase DX_HASH_HALF_MD4:\n \t\tp = name;\n \t\twhile (len > 0) {\n-\t\t\t(*str2hashbuf)(p, len, in, 8);\n+\t\t\tif (use_unsigned)\n+\t\t\t\tstr2hashbuf_unsigned(p, len, in, 8);\n+\t\t\telse\n+\t\t\t\tstr2hashbuf_signed(p, len, in, 8);\n \t\t\thalf_md4_transform(buf, in);\n \t\t\tlen -= 32;\n \t\t\tp += 32;\n@@ -246,12 +263,15 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len,\n \t\thash = buf[1];\n \t\tbreak;\n \tcase DX_HASH_TEA_UNSIGNED:\n-\t\tstr2hashbuf = str2hashbuf_unsigned;\n+\t\tuse_unsigned = true;\n \t\tfallthrough;\n \tcase DX_HASH_TEA:\n \t\tp = name;\n \t\twhile (len > 0) {\n-\t\t\t(*str2hashbuf)(p, len, in, 4);\n+\t\t\tif (use_unsigned)\n+\t\t\t\tstr2hashbuf_unsigned(p, len, in, 4);\n+\t\t\telse\n+\t\t\t\tstr2hashbuf_signed(p, len, in, 4);\n \t\t\tTEA_transform(buf, in);\n \t\t\tlen -= 16;\n \t\t\tp += 16;\n",
    "prefixes": [
        "v3",
        "2/2"
    ]
}