]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - block/blk-core.c
block: deal with stale req count of plug list
[mirror_ubuntu-bionic-kernel.git] / block / blk-core.c
index eea246567884bc37d45d40fe75ba60bbfc12221b..473dd698effdb8c414ac52f1cb442db58d148238 100644 (file)
@@ -1753,8 +1753,11 @@ get_rq:
                /*
                 * If this is the first request added after a plug, fire
                 * of a plug trace.
+                *
+                * @request_count may become stale because of schedule
+                * out, so check plug list again.
                 */
-               if (!request_count)
+               if (!request_count || list_empty(&plug->list))
                        trace_block_plug(q);
                else {
                        struct request *last = list_entry_rq(plug->list.prev);