From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> [ Upstream commit 5ce805869cbed93267ed26552ff76e30f05c91f7 ] Sometimes, some merged IOs could get a chance to be submitted, resulting in system hang in shutdown test. This issues IOs all the time after shutdown. Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> --- fs/f2fs/data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c61beaedf0789..b4a634da1372b 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -543,6 +543,8 @@ skip: if (fio->in_list) goto next; out: + if (is_sbi_flag_set(sbi, SBI_IS_SHUTDOWN)) + __submit_merged_bio(io); up_write(&io->io_rwsem); } -- 2.20.1