Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194195/?format=api
{ "id": 2194195, "url": "http://patchwork.ozlabs.org/api/patches/2194195/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260207100148.724275-4-simon.weber.39@gmail.com/", "project": { "id": 8, "url": "http://patchwork.ozlabs.org/api/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": "<20260207100148.724275-4-simon.weber.39@gmail.com>", "list_archive_url": null, "date": "2026-02-07T09:53:03", "name": "[v2] ext4: fix journal credit check when setting fscrypt context", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4a98ddcd421db72fad88e619947060912cbae7b0", "submitter": { "id": 92579, "url": "http://patchwork.ozlabs.org/api/people/92579/?format=api", "name": "Simon Weber", "email": "simon.weber.39@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ext4/patch/20260207100148.724275-4-simon.weber.39@gmail.com/mbox/", "series": [ { "id": 491370, "url": "http://patchwork.ozlabs.org/api/series/491370/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ext4/list/?series=491370", "date": "2026-02-07T09:53:03", "name": "[v2] ext4: fix journal credit check when setting fscrypt context", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/491370/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194195/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2194195/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <SRS0=eQVQ=AL=vger.kernel.org=linux-ext4+bounces-13616-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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=YqJ0Kt/+;\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=eqvq=al=vger.kernel.org=linux-ext4+bounces-13616-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)", "gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=172.234.253.10 arc.chain=subspace.kernel.org", "gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "gandalf.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=20230601 header.b=YqJ0Kt/+;\n\tdkim-atps=neutral", "gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-13616-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"YqJ0Kt/+\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.128.42", "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 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 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f7RRJ6KScz1xvD\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 21:05:32 +1100 (AEDT)", "from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4f7RRB6TJwz4wCX\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 07 Feb 2026 21:05:26 +1100 (AEDT)", "by gandalf.ozlabs.org (Postfix)\n\tid 4f7RRB682Xz4wCp; Sat, 07 Feb 2026 21:05:26 +1100 (AEDT)", "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\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 4f7RR72vFPz4wCX\n\tfor <patchwork-incoming@ozlabs.org>; Sat, 07 Feb 2026 21:05:23 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 0646C301D330\n\tfor <patchwork-incoming@ozlabs.org>; Sat, 7 Feb 2026 10:05:20 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 32B5B3328F8;\n\tSat, 7 Feb 2026 10:05:20 +0000 (UTC)", "from mail-wm1-f42.google.com (mail-wm1-f42.google.com\n [209.85.128.42])\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 9B6973321C8\n\tfor <linux-ext4@vger.kernel.org>; Sat, 7 Feb 2026 10:05:19 +0000 (UTC)", "by mail-wm1-f42.google.com with SMTP id\n 5b1f17b1804b1-482f2599980so34956685e9.0\n for <linux-ext4@vger.kernel.org>;\n Sat, 07 Feb 2026 02:05:19 -0800 (PST)", "from ewewe.. ([2a00:d4a0:5:3200::2])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48317d835f0sm181827715e9.14.2026.02.07.02.05.11\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 07 Feb 2026 02:05:13 -0800 (PST)" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1770458726; cv=pass;\n\tb=vQknoizs3VS9j5Pi9NDus2LCCW+NGZbzauXgXXWVPfpXAaYfmPAGCy63zKoALAzmRhRLNWY+jYKsLywf1Auow5Q8CRL4XpIG6ab/1uOeLdH+JX04LvBbeJDXr3QZRJKcFFIqSIxbVLM1JMjqt8Jn3Z14xtb4ln/Ewv5Zg86mrG2sGSLN4a5zPMjE5KBDvFvwyflsK4VEj4CXpbwgudLlTtLgSugdGCSNAwU+ydmBbcH5VJsY0C2rBXkReK/wVZqyAl2qMCh5/0nZvFSQlhEnsQGvzXAmJ9JyvjxyDz3C5hDTDBIR1rg3w5X4P4L1qG9iiR/i4CNee2mtGM9qfyaceg==", "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1770458720; cv=none;\n b=Rp1cAh/gssJoLFUO2atT7jIyyfFbsEc0wj5bPulTBgRw0HFIzvABPitFyb4ss/65wZMeNQToaCkkm3LpJty4RoM83O7BxUv8f+jffTHO5l6iv8su9Z3wwq9iFBdBT2+G7TWj2WGxNdaH5CuNlcXXyUJKqx2uR+JS5PRQeJm2OEo=" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1770458726; c=relaxed/relaxed;\n\tbh=FoH7DPlRY6JcUO1K1yPBAL6Lwnx34i+NcsDw5009tM0=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=ZtLCr1wxNGfIC5bKDamJ9xVbFRcBEid9xHvnB+gCzArYOngBsvH1Hw0FzN9RrfimImgie6fB85Eq3328MRynmGDSSESq5z6zXjNCYSWmUv86yAxTGOQaK3oeXDhiJmrwnrBWjsgdQixJPuGI1BAP2Jqt4e9OVfhdjj1UjpxX2Bn+wxmCOgy1Jm+KLaX7npaPoivFLeFvsjD2SYvGB1nR/ztUHKtdkdLIf+WuoP4PeG+M3T2wUiiNcXFTtU5nKH0Lv6G19ZXtzAzE0PoUhrdadRhEiMMs5AVHkncGaA7baMnRn5vxu5JU2HXu1bXug96K8Vcu0D34IXyDJ+CIp6EXyQ==", "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1770458720; c=relaxed/simple;\n\tbh=nt0OpJk9yNClYqQUmCVLyWL3xhyGAkVjpnvfTJmp1J8=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=VV1qP2TwjoVenDaSCDqoRcLw8jzd6vc82qv8OEIAWQ65mz0eJRRLK4mBrbZe9Mc7jHuBt4c+6aNXO1J9AGB2YrNvxXQz0AReCCuxZsYZyqkYlpw3Chh38+SMA5SjN7oxlK0T5vMivPk+i3LAEyIrKqdq/tVR1ZlMiNLRLRbZZg4=" ], "ARC-Authentication-Results": [ "i=2; gandalf.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com; dkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=YqJ0Kt/+; dkim-atps=neutral;\n spf=pass (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-ext4+bounces-13616-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org", "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=YqJ0Kt/+; arc=none smtp.client-ip=209.85.128.42" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770458718; x=1771063518;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=FoH7DPlRY6JcUO1K1yPBAL6Lwnx34i+NcsDw5009tM0=;\n b=YqJ0Kt/+Vn5d6IfvROuf1qTysc5F96Q6lOB06hU8vjffDgMg3AXO7XprdlxKi8LR3d\n Mg2rMxCJyFEQInn/V007sQgbjSAtllK617QsDh5Jge7xsSxfaJFOwmFOBrCy+GCVo028\n aewH5JNLd6YlXMuA7IEop/JxwuD6r7tYXBTGklEmqUij8RWka1URz2v/QjGgICq5ou6t\n 6X/2HE1UWxhOZrDYQacGJ/bxgi5d/vNOMD6zf+DJaAvPHLO1X7S1zfKaTqKhAJRgrLr2\n QVa6Ur3o9pGBhX9qWg+38Qunqwc8MrveUcU3FIYnRSsSvrP/YO4cnhuvUzkHu54WweL3\n Xz9w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770458718; x=1771063518;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=FoH7DPlRY6JcUO1K1yPBAL6Lwnx34i+NcsDw5009tM0=;\n b=MoVtO9wxYAiJeYIA/K3Iq9JVHNzZFsoX6KuDvUiZ9usiKKSJ/b/HdsnrPZOPS3KlBc\n tmaLRAxNvn+yygwOJG3/DkWC4DFSpNl1hH3E0E/akhN+lkx5Z1B6inJJRN0tDoX+sI9d\n R2vtA6VTZtTXrzF6cl90JHo4zY83zPmCL3BE4gD+gJdjTro5K0/QuElmna/9nzZsd6hf\n ODmxD/ROELBMU5p6gq6YY+WJLC8HbDoXBNW/0eRdxhXiOeV2uuAya2kLKF8d01fRwPPD\n cQODMTxcicqzlMewlx/xQ7gF2qOROyRrHiEqPqpAp7PAsLCklTdLE0XMUrf3RDrfPRSw\n ljtg==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCUqAyaCstpXRD3eAm7Ltjqb69tQu5c8zat9+sHj2rfuj2Fnke5EdwZB+BMaMiponyJmcxJZPk+0dSLa@vger.kernel.org", "X-Gm-Message-State": "AOJu0YzHXxRVhiUQ+oY05hLOGiZgUAWo43ervfT7XDj9Bt0Z3b828H55\n\tybgS3hLamq664YHfX5f6s58dXqNv4GzRAjhK2TqrPlV2XcsskmLsJiLa", "X-Gm-Gg": "AZuq6aLgJEcfV7iFnoq/g4QsiM81MdCCGABkvErQGJlumms7u30fmt7BYluLqWge1mn\n\tvzHDowy/ursLSBSeH9YGeKjlVccg8Ocej3uvuXdJ3LdVp69vE8qZEjxV33b68oGcmwlVX9gf+XU\n\tEupyXecxjVr0ixzIT8RKsz9EF/0J/JVx8sbzFqTlvSVYYLG8klmhwEL1JGG+7oXij+RqTyOl8bH\n\txc5crnVLk8UQIVpbFmhXcJ1owbIf2n/8uMeRsgHBV16gEzQn6ohS/ILB5I2/B+kGXjg1fjADuPg\n\t2BCxmDNoih6fZ2IJ0ihVkAZLqR+S6FVR86kmAJdb16i/00ECTsx3qmqFYEQhG/Nl+tC5aztxkch\n\tRFei/Xl/8fV4gY3c+7afYaqfYcyRaOZfhGy/qtmnU6F6N/iuksr9UyhVGpYl7CJ5G", "X-Received": "by 2002:a05:600c:46d2:b0:480:4a90:1b06 with SMTP id\n 5b1f17b1804b1-4832022c31fmr76247505e9.34.1770458717680;\n Sat, 07 Feb 2026 02:05:17 -0800 (PST)", "From": "Simon Weber <simon.weber.39@gmail.com>", "To": "linux-kernel@vger.kernel.org,\n\tlinux-ext4@vger.kernel.org,\n\ttytso@mit.edu,\n\tadilger.kernel@dilger.ca", "Cc": "Simon Weber <simon.weber.39@gmail.com>,\n\ttahsin@google.com,\n\tebiggers@kernel.org,\n\tAnthony Durrer <anthonydev@fastmail.com>", "Subject": "[PATCH v2] ext4: fix journal credit check when setting fscrypt\n context", "Date": "Sat, 7 Feb 2026 10:53:03 +0100", "Message-ID": "<20260207100148.724275-4-simon.weber.39@gmail.com>", "X-Mailer": "git-send-email 2.49.0", "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.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tFREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,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": "Fix an issue arising when ext4 features has_journal, ea_inode, and encrypt\nare activated simultaneously, leading to ENOSPC when creating an encrypted\nfile.\n\nFix by passing XATTR_CREATE flag to xattr_set_handle function if a handle\nis specified, i.e., when the function is called in the control flow of\ncreating a new inode. This aligns the number of jbd2 credits set_handle\nchecks for with the number allocated for creating a new inode.\n\next4_set_context must not be called with a non-null handle (fs_data) if\nfscrypt context xattr is not guaranteed to not exist yet. The only other\nusage of this function currently is when handling the ioctl\nFS_IOC_SET_ENCRYPTION_POLICY, which calls it with fs_data=NULL.\n\nFixes: c1a5d5f6ab21eb7e (\"ext4: improve journal credit handling in set xattr paths\")\n\nCo-developed-by: Anthony Durrer <anthonydev@fastmail.com>\nSigned-off-by: Anthony Durrer <anthonydev@fastmail.com>\nSigned-off-by: Simon Weber <simon.weber.39@gmail.com>\n\n---\n fs/ext4/crypto.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)", "diff": "diff --git a/fs/ext4/crypto.c b/fs/ext4/crypto.c\nindex cf0a0970c095..a89a14dffa48 100644\n--- a/fs/ext4/crypto.c\n+++ b/fs/ext4/crypto.c\n@@ -163,10 +163,15 @@ static int ext4_set_context(struct inode *inode, const void *ctx, size_t len,\n \t */\n \n \tif (handle) {\n+\t\t/*\n+\t\t * Since the inode is new it is ok to pass the XATTR_CREATE flag. This\n+\t\t * is necessary to match the reamining journal credits check in the\n+\t\t * set_handle function with the credits allocated for the new inode.\n+\t\t */\n \t\tres = ext4_xattr_set_handle(handle, inode,\n \t\t\t\t\t EXT4_XATTR_INDEX_ENCRYPTION,\n \t\t\t\t\t EXT4_XATTR_NAME_ENCRYPTION_CONTEXT,\n-\t\t\t\t\t ctx, len, 0);\n+\t\t\t\t\t ctx, len, XATTR_CREATE);\n \t\tif (!res) {\n \t\t\text4_set_inode_flag(inode, EXT4_INODE_ENCRYPT);\n \t\t\text4_clear_inode_state(inode,\n", "prefixes": [ "v2" ] }