dm bufio: drop the lock when doing GFP_NOIO allocation
commit34d2fe724aeed1d61dd524d1062cf428f5bca2f1
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 23 Nov 2016 22:04:00 +0000 (23 17:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2018 14:26:45 +0000 (11 16:26 +0200)
treefcdb1e706236ebc481cfa2c4dd66a86e0930175e
parent0758c35b535fc166e743b05287bf395e2241fa60
dm bufio: drop the lock when doing GFP_NOIO allocation

commit 41c73a49df31151f4ff868f28fe4f129f113fa2c upstream.

If the first allocation attempt using GFP_NOWAIT fails, drop the lock
and retry using GFP_NOIO allocation (lock is dropped because the
allocation can take some time).

Note that we won't do GFP_NOIO allocation when we loop for the second
time, because the lock shouldn't be dropped between __wait_for_free_buffer
and __get_unclaimed_buffer.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-bufio.c