All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hui Peng" <benquike@gmail.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] ext4: clear EXT4_STATE_MAY_INLINE_DATA in swap_inode_boot_loader()
Date: Sat, 19 Sep 2026 21:00:02 +0000	[thread overview]
Message-ID: <20260919210003.228521F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260919204812.2814531-1-benquike@gmail.com>

> swap_inode_boot_loader() (EXT4_IOC_SWAP_BOOT) checks
> !ext4_has_inline_data(inode), but neither checks
> ext4_has_inline_data(inode_bl) nor clears EXT4_STATE_MAY_INLINE_DATA on
> inode and inode_bl after swapping their inode data.
> 
> When a newly created empty file (which has EXT4_STATE_MAY_INLINE_DATA
> set in memory) is swapped with a non-empty EXT4_BOOT_LOADER_INO that
> already has extent blocks, the target inode retains
> EXT4_STATE_MAY_INLINE_DATA == 1 alongside extent blocks. A subsequent
> ftruncate() + small pwrite() + fsync() dirties folio 0 while converting
> the inode to inline data, hitting
> BUG_ON(ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) in
> ext4_writepages().
> 
> Reject inline data on inode_bl and clear EXT4_STATE_MAY_INLINE_DATA on
> both inodes in swap_inode_boot_loader().
> 
> Fixes: 67a11611e1a5 ("ext4: fix check of inode in swap_inode_boot_loader")
> Assisted-by: LLM
> Signed-off-by: Hui Peng <benquike@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260919204812.2814531-1-benquike@gmail.com?part=1


  reply	other threads:[~2026-09-19 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19 20:48 [PATCH] ext4: clear EXT4_STATE_MAY_INLINE_DATA in swap_inode_boot_loader() Hui Peng
2026-09-19 21:00 ` sashiko-bot [this message]
2026-09-24 16:02 ` 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=20260919210003.228521F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=benquike@gmail.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.