dm: remove useless test in alloc_multiple_bios
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 9 Jan 2025 13:47:20 +0000 (14:47 +0100)
committerMikulas Patocka <mpatocka@redhat.com>
Fri, 17 Jan 2025 21:05:39 +0000 (22:05 +0100)
commit6942348d1bbdb612bc14025cab467fd1f012abe8
treebe8cbb20a0a9e0e019e68194ac080c8928d9b18d
parentc3a1f2ef72a97a79410c566022c5ea962f815ed9
dm: remove useless test in alloc_multiple_bios

The test gfp_flag & GFP_NOWAIT was always true, because both GFP_NOIO and
GFP_NOWAIT include the flag __GFP_KSWAPD_RECLAIM. Luckily, this oversight
didn't result in any harm; the loop always started with "try = 0".

This patch removes the faulty test and explicitly starts the loop with
"try = 0" (so that we don't hold the mutex in the first iteration).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm.c