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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:25 +0000 (15:07 -0800)
commite759d3185f48fbeb6e4e3f741120c7689741decd
tree1a23973aca746252b5a455fbe2a54df9e6431e24
parent7bf68a0afc0f367118ac765081f19c8cfd93823f
IB/qib: Support creating qps with GFP_NOIO flag

commit fbbeb8632bf0b46ab44cfcedc4654cd7831b7161 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/qib/qib_qp.c