mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Aditya Srivastava <aditya.ansh182@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Jan Kara <jack@suse.cz>, Baokun Li <libaokun@linux.alibaba.com>,
	Ojaswin Mujoo <ojaswin@linux.ibm.com>,
	Ritesh Harjani <ritesh.list@gmail.com>,
	Zhang Yi <yi.zhang@huawei.com>, Tao Ma <boyu.mt@taobao.com>,
	syzbot+0c89d865531d053abb2d@syzkaller.appspotmail.com,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] ext4: use fsdata to track inline data write state and fix race
Date: Thu, 23 Jul 2026 09:08:38 -0400	[thread overview]
Message-ID: <178481171744.796182.4771772432914384249.b4-ty@b4> (raw)
In-Reply-To: <20260703045414.1768-1-aditya.ansh182@gmail.com>


On Fri, 03 Jul 2026 04:54:12 +0000, Aditya Srivastava wrote:
> Instead of checking the live inode state (ext4_has_inline_data(inode)
> and ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) in the
> write_end handlers, use the fsdata parameter of the address space
> operations to explicitly pass down the state in which write_begin
> prepared the write.
> 
> A concurrent thread (such as ext4_page_mkwrite()) can convert the
> inline data to an extent between write_begin and write_end. If this
> happens, the write_end handlers would previously miss the inline
> write_end path and fall through to extent-based write_end logic.
> However, since block buffers were never allocated in write_begin,
> this resulted in NULL pointer dereferences or data loss because
> folio_buffers(folio) was NULL.
> 
> [...]

Applied, thanks!

[1/2] ext4: use fsdata to track inline data write state and fix race
      commit: 7edbb323bab2b2a609016014caafdb651c898249
[2/2] ext4: cleanup unused CONVERT_INLINE_DATA flag
      commit: f6065852d2137734bcb26c9f94e5daf526179aa9

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>

      parent reply	other threads:[~2026-07-23 13:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-03  4:54 Aditya Srivastava
2026-07-03  4:54 ` [PATCH v4 2/2] ext4: cleanup unused CONVERT_INLINE_DATA flag Aditya Srivastava
2026-07-03 15:30   ` Jan Kara
2026-07-03 15:30 ` [PATCH v4 1/2] ext4: use fsdata to track inline data write state and fix race Jan Kara
2026-07-23 13:08 ` Theodore Ts'o [this message]

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=178481171744.796182.4771772432914384249.b4-ty@b4 \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=aditya.ansh182@gmail.com \
    --cc=boyu.mt@taobao.com \
    --cc=jack@suse.cz \
    --cc=libaokun@linux.alibaba.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=syzbot+0c89d865531d053abb2d@syzkaller.appspotmail.com \
    --cc=yi.zhang@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®