]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - block/bio.c
blk: Ensure users for current->bio_list can see the full list.
authorNeilBrown <neilb@suse.com>
Fri, 10 Mar 2017 06:00:47 +0000 (17:00 +1100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:50 +0000 (10:11 +0200)
commita08ef1935182805c9f7d7dda3b01c0bb8a7172ab
treee6015d0ac1f6686065cc70c6cf95d51f2e1ce0d6
parent35bb3bd688795946fb391a3d0181c025aca4f5e9
blk: Ensure users for current->bio_list can see the full list.

BugLink: http://bugs.launchpad.net/bugs/1681875
commit f5fe1b51905df7cfe4fdfd85c5fb7bc5b71a094f upstream.

Commit 79bd99596b73 ("blk: improve order of bio handling in generic_make_request()")
changed current->bio_list so that it did not contain *all* of the
queued bios, but only those submitted by the currently running
make_request_fn.

There are two places which walk the list and requeue selected bios,
and others that check if the list is empty.  These are no longer
correct.

So redefine current->bio_list to point to an array of two lists, which
contain all queued bios, and adjust various code to test or walk both
lists.

Signed-off-by: NeilBrown <neilb@suse.com>
Fixes: 79bd99596b73 ("blk: improve order of bio handling in generic_make_request()")
Signed-off-by: Jens Axboe <axboe@fb.com>
Cc: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
block/bio.c
block/blk-core.c
drivers/md/dm.c
drivers/md/raid10.c