[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_48AA749F76BD66F03C5F3724972036684A09@qq.com>
Date: Mon, 5 Aug 2024 19:46:43 +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 b865a3fa52f3..682c5a237edc 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -985,6 +985,7 @@ static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
struct bdi_writeback *last_wb = NULL;
struct bdi_writeback *wb = list_entry(&bdi->wb_list,
struct bdi_writeback, bdi_node);
+ bool no_queue = true;
might_sleep();
restart:
@@ -1015,6 +1016,7 @@ static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
*work = *base_work;
work->nr_pages = nr_pages;
work->auto_free = 1;
+ no_queue = false;
wb_queue_work(wb, work);
continue;
}
@@ -1043,6 +1045,12 @@ static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
wb_wait_for_completion(&fallback_work_done);
goto restart;
}
+
+ if (no_queue) {
+ printk("no queue\n");
+ base_work->auto_free = 1;
+ finish_writeback_work(base_work);
+ }
rcu_read_unlock();
if (last_wb)
Powered by blists - more mailing lists