From b8b56e315296c3ddcb2be6da5d375a27f027b2eb Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 28 Sep 2022 13:01:17 +0200 Subject: [PATCH] Revert "ext4: Avoid writeback path when fs is shut down" This reverts commit f50891a7a1c272c220c0b2b25120b279f22ad5f2. The patch didn't work to supress the sporadic "ext4_writepages: jbd2_start: XXX pages, ino YYY; err -5" warnings we sometimes get when mxqd tries to unmount the temporary job filesystems using - fcntl EXT4_IOC_SHUTDOWN with EXT4_GOING_FLAGS_NOLOGFLUSH - dmestup reload $dmname --table "0 $sectors zero" - dmsetup resume $dmname --noflush - umount $mountpoint - dmsetup remove --deferred $dmname - rmdir $mountpoint to avoid writeback. --- fs/ext4/super.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3a31450e292b3..cd9a26ca12e02 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -523,10 +523,6 @@ static int ext4_journalled_submit_inode_data_buffers(struct jbd2_inode *jinode) static int ext4_journal_submit_inode_data_buffers(struct jbd2_inode *jinode) { int ret; - journal_t *journal = EXT4_SB(jinode->i_vfs_inode->i_sb)->s_journal; - - if (!journal || is_journal_aborted(journal)) - return 0; if (ext4_should_journal_data(jinode->i_vfs_inode)) ret = ext4_journalled_submit_inode_data_buffers(jinode); @@ -539,10 +535,6 @@ static int ext4_journal_submit_inode_data_buffers(struct jbd2_inode *jinode) static int ext4_journal_finish_inode_data_buffers(struct jbd2_inode *jinode) { int ret = 0; - journal_t *journal = EXT4_SB(jinode->i_vfs_inode->i_sb)->s_journal; - - if (!journal || is_journal_aborted(journal)) - return 0; if (!ext4_should_journal_data(jinode->i_vfs_inode)) ret = jbd2_journal_finish_inode_data_buffers(jinode);