[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_DC67EC3CBB36D2971037E24A78740777C909@qq.com>
Date: Sat, 20 Jul 2024 10:31:48 +0800
From: Edward Adam Davis <eadavis@...com>
To: syzbot+eda89a33c5856f66f823@...kaller.appspotmail.com
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [jfs?] INFO: task hung in txBegin
with sb rwsem lock to order syncfs and wb worker
#syz test: upstream 50736169ecc8
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 92a5b8283528..660a1ac8912f 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2123,8 +2123,12 @@ static long wb_writeback(struct bdi_writeback *wb,
queue_io(wb, work, dirtied_before);
queued = true;
}
- if (work->sb)
+ if (work->sb) {
+ printk("sb: %p, %s\n", work->sb, __func__);
+ down_write(&work->sb->s_umount);
progress = writeback_sb_inodes(work->sb, wb, work);
+ up_write(&work->sb->s_umount);
+ }
else
progress = __writeback_inodes_wb(wb, work);
trace_writeback_written(wb, work);
diff --git a/fs/sync.c b/fs/sync.c
index dc725914e1ed..111c3c29b139 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -51,6 +51,7 @@ int sync_filesystem(struct super_block *sb)
* methods call sync_dirty_buffer() and thus effectively write one block
* at a time.
*/
+ printk("sb: %p, %s\n", sb, __func__);
writeback_inodes_sb(sb, WB_REASON_SYNC);
if (sb->s_op->sync_fs) {
ret = sb->s_op->sync_fs(sb, 0);
Powered by blists - more mailing lists