dm bufio: drop the lock when doing GFP_NOIO allocation
commit7e236e61e19a023cebf672fd38b685ec206fae08
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 13:42:25 +0000 (11 15:42 +0200)
treefe295d13d66b35243d54034ced06a145d17ee52c
parent317a19057a62ba7ee9b3560725aec9b133c80550
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