[PATCH 1/2] ext4: Fix data=journal writeback of DMA pinned page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The condition in ext4_writepages() checking whether the filesystem is
frozen had a brown paper bag bug resulting in us never writing back
DMA pinned pages. Fix the condition.

Reported-by: Eric Biggers <ebiggers@xxxxxxxxxx>
Link: https://lore.kernel.org/all/20230319183617.GA896@sol.localdomain
Fixes: 18b7f4107219 ("ext4: Fix warnings when freezing filesystem with journaled data")
Signed-off-by: Jan Kara <jack@xxxxxxx>
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3e311c85df08..15bac8181798 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2436,7 +2436,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
 	 * loop clears them.
 	 */
 	if (ext4_should_journal_data(mpd->inode) &&
-	    sb->s_writers.frozen >= SB_FREEZE_FS) {
+	    sb->s_writers.frozen < SB_FREEZE_FS) {
 		handle = ext4_journal_start(mpd->inode, EXT4_HT_WRITE_PAGE,
 					    bpp);
 		if (IS_ERR(handle))
-- 
2.35.3




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux