From: sashiko-bot@kernel.org
To: Alan <3164729207@qq.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v3] ext4: reserve inode write access before unlinking entry
Date: Wed, 18 Nov 2026 14:26:51 +0000 [thread overview]
Message-ID: <sashiko-outbox-221200@kernel.org> (raw)
In-Reply-To: <tencent_6D3188701BD3C36F588C221C4CD924FB7809@qq.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ext4: missing Signed-off-by trailer in commit message
--
commit b509da876656fd700f861cfb297b84e9a09eede0
Author: Alan <3164729207@qq.com>
> ext4: reserve inode write access before unlinking entry
>
> __ext4_unlink() removes the directory entry before decrementing the target
> inode's link count. It then dirties the parent inode. If the parent
> inode-table block cannot be read, parent inode dirtying fails after the
> entry has been removed, and unlink returns without dropping the target
> inode's link count. With errors=continue, this read error need not abort
> the journal transaction, so the directory update can be committed without
> the corresponding link-count update.
>
> Reserve the target inode location and journal write access first. When the
> directory entry is being removed, reserve the parent inode in the existing
> branch before deleting the entry. This makes inode-table read and access
> errors fail before the namespace is changed. Keep the existing namespace
> and link-count update order, and release inode location references on every
> exit path. Fast-commit replay can skip the parent update when the directory
> entry does not match the target inode, so only the target inode is reserved
> in that case.
>
> The original source-derived injection at the journal write-access boundary
> is not evidence for a committed inconsistency: an error after the journal
> has already aborted cannot establish a committed transaction. The relevant
> failure is an actual inode-table READ EIO before journal write access.
>
> Tested on Linux 7.4-rc3 (torvalds/linux commit
> aebb7274476403040d582c61478df8f4a7bf9cd3) with QEMU blkdebug and
> errors=continue. On the unpatched kernel, the READ EIO leaves the directory
> entry removed with Links: 1 after normal unmount; the JBD2 trace shows no
> journal abort and records the transaction commit, and e2fsck -fn reports
> an unattached inode. With this patch, the same error is returned before the
> directory entry is removed; the file remains present with Links: 1 and
> e2fsck -fn passes. No-fault controls pass on both kernels. Also built
> fs/ext4/namei.o with W=1.
>
> Fixes: 4209ae12b122 ("ext4: handle ext4_mark_inode_dirty errors")
> Link: https://lore.kernel.org/linux-ext4/tencent_D60E766CE07D3A1847B81DE9BC37B4466908@qq.com/
> Cc: stable@vger.kernel.org
[Severity: High]
The commit message is missing a Signed-off-by trailer, which is required by
the Developer's Certificate of Origin in
Documentation/process/submitting-patches.rst before the patch can be applied.
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_6D3188701BD3C36F588C221C4CD924FB7809@qq.com?part=1
next prev parent reply other threads:[~2026-11-18 14:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 10:53 [PATCH] ext4: reserve inode write access before unlinking entry Alan
2026-10-27 11:05 ` sashiko-bot
2026-11-16 7:35 ` Alan
2026-11-16 12:48 ` Jan Kara
2026-11-17 3:39 ` [PATCH v2] " Alan
2026-11-17 3:51 ` sashiko-bot
2026-11-18 12:02 ` Jan Kara
2026-11-18 14:19 ` [PATCH v3] " Alan
2026-11-18 14:26 ` sashiko-bot [this message]
2026-11-18 15:02 ` [PATCH v4] " Alan
2026-11-18 15:11 ` sashiko-bot
2026-11-19 14:50 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-221200@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=3164729207@qq.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.