If the selected memory registration mode is not supported by the
underlying provider/HCA, the NFS mount command reports that there was
an invalid mount option, and fails. This is misleading.
Reporting a problem allocating memory is a lot closer to the truth.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
 #if RPCRDMA_PERSISTENT_REGISTRATION
                        memreg = RPCRDMA_ALLPHYSICAL;
 #else
-                       rc = -EINVAL;
+                       rc = -ENOMEM;
                        goto out2;
 #endif
                }
                }
                break;
        default:
-               printk(KERN_ERR "%s: invalid memory registration mode %d\n",
-                               __func__, memreg);
-               rc = -EINVAL;
+               printk(KERN_ERR "RPC: Unsupported memory "
+                               "registration mode: %d\n", memreg);
+               rc = -ENOMEM;
                goto out2;
        }
        dprintk("RPC:       %s: memory registration strategy is %d\n",