summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2026-04-24 18:42:01 +0800
committerTheodore Ts'o <tytso@mit.edu>2026-06-01 08:25:38 -0400
commitd99748ef1695ce17eaf51c64b7a06952fa7cddab (patch)
treec34fac8989e12b8b872b5f6dd0560fcf87f235d0 /drivers/phy/eswin/git@git.tavy.me:linux.git
parent4bdba812279bb1fd64450cf575f58f3546aa7e9e (diff)
ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode data writeback
In EXT4_GOING_FLAGS_LOGFLUSH mode, the EXT4_FLAGS_SHUTDOWN flag was set before calling ext4_force_commit(). This caused ordered-mode data writeback (triggered by journal commit) to fail with -EIO, since ext4_do_writepages() checks for the shutdown flag. The journal would then be aborted prematurely before the commit could succeed. Fix this by calling ext4_force_commit() first, then setting the shutdown flag, so that pending data can be written back correctly. Note that moving ext4_force_commit() before setting the shutdown flag creates a small window in which new writes may occur and generate new journal transactions. When the journal is subsequently aborted, the new transactions will not be able to write to disk. This is intentional because LOGFLUSH's semantics are to flush pre-existing journal entries before shutdown, not to guarantee atomicity for writes that race with the ioctl. Fixes: 783d94854499 ("ext4: add EXT4_IOC_GOINGDOWN ioctl") Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Baokun Li <libaokun@linux.alibaba.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260424104201.1930823-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions