[PATCH 6/6] nvmet: use GFP_KERNEL for PR allocations

Nilay Shroff nilay at linux.ibm.com
Fri Nov 6 05:35:09 PST 2026


On 11/6/26 7:28 AM, Guixin Liu wrote:
> nvmet_pr_update_reg_attr() and nvmet_pr_alloc_and_insert_pc_ref()
> allocate with GFP_ATOMIC, but both run in sleepable context: the PR
> command handlers execute from the transport workqueues and take the
> pr_sem semaphore, and the pc_ref allocation is reached from the
> connect and configfs paths. The latter function even passes
> GFP_KERNEL to the percpu_ref_init() in the same scope, so the
> GFP_ATOMIC only raises the failure rate for no reason.
> 
> Switch both allocations to GFP_KERNEL.
> 
> Fixes: 5a47c2080a73 ("nvmet: support reservation feature")
> Cc:stable at vger.kernel.org
> Signed-off-by: Guixin Liu<kanie at linux.alibaba.com>

Looks good to me:
Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>




More information about the Linux-nvme mailing list