fix /dev/sg allocation failures register

Christoph Hellwig
2026-04-15T06:08:19Z

Hi all,

Shin'ichiro reported trivially triggerable allocation failures when
using SG_IO on the sg driver. This turn out to be caused by the
bio allocation rework, which makes non-blocking allocation fail
much easier.

This series has two independent patches to fix this from different
angles. The first one changes the completely pointless GFP_ATOMIC
to use GFP_ATOMIC in sg. The other drops the reduction of the gfp
mask in the bio allocator, so that atomic allocations of bios work
as expected, even if they are a pretty bad idea as the bio submission
actually needs a user context anyway. The only other uses of this
seems to be the ocfs2 cluster managed.