IB/qib: Support creating qps with GFP_NOIO flag
authorVinit Agnihotri <vinit.abhay.agnihotri@intel.com>
Mon, 11 Jan 2016 17:57:25 +0000 (12:57 -0500)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:17:40 +0000 (15:17 -0500)
commitfbbeb8632bf0b46ab44cfcedc4654cd7831b7161
treeda1c79364eeca7e51bd557725832391572349c36
parent65487fdc0c8072b6ac32ed30fab34de4e66ace55
IB/qib: Support creating qps with GFP_NOIO flag

The current code is problematic when the QP creation and ipoib is used to
support NFS and NFS desires to do IO for paging purposes. In that case, the
GFP_KERNEL allocation in qib_qp.c causes a deadlock in tight memory
situations.

This fix adds support to create queue pair with GFP_NOIO flag for connected
mode only to cleanly fail the create queue pair in those situations.

Cc: <stable@vger.kernel.org> # 3.16+
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Vinit Agnihotri <vinit.abhay.agnihotri@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qib/qib_qp.c