On Mon, Jan 13, 2025 at 10:24:26AM +0800, Ming Lei wrote: > If vfs_flush() is called with queue frozen, the queue freeze lock may be > connected with FS internal lock What "FS internal lock" ? > , and potential deadlock could be > triggered. > > Fix it by moving vfs_flush() out of queue freezing. That doesn't work. The pagecache will be dirties by any command processed using buffered I/O, so we need to freeze first to ensure that there are no outstanding commands.