Commit 23a88ade authored by Calum Mackay's avatar Calum Mackay Committed by Anna Schumaker

nfs: Referrals not inheriting proto setting from parent

Commit 530ea421 ("nfs: Referrals should use the same proto setting
as their parent") encloses the fix with #ifdef CONFIG_SUNRPC_XPRT_RDMA.

CONFIG_SUNRPC_XPRT_RDMA is a tristate option, so it should be tested
with #if IS_ENABLED().

Fixes: 530ea421 ("nfs: Referrals should use the same proto setting as their parent")
Reported-by: default avatarHelen Chao <helen.chao@oracle.com>
Tested-by: default avatarHelen Chao <helen.chao@oracle.com>
Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarBill Baker <bill.baker@oracle.com>
Signed-off-by: default avatarCalum Mackay <calum.mackay@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 8b199e58
...@@ -1127,7 +1127,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, ...@@ -1127,7 +1127,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
nfs_server_copy_userdata(server, parent_server); nfs_server_copy_userdata(server, parent_server);
/* Get a client representation */ /* Get a client representation */
#ifdef CONFIG_SUNRPC_XPRT_RDMA #if IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA)
rpc_set_port(data->addr, NFS_RDMA_PORT); rpc_set_port(data->addr, NFS_RDMA_PORT);
error = nfs4_set_client(server, data->hostname, error = nfs4_set_client(server, data->hostname,
data->addr, data->addr,
...@@ -1139,7 +1139,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, ...@@ -1139,7 +1139,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
parent_client->cl_net); parent_client->cl_net);
if (!error) if (!error)
goto init_server; goto init_server;
#endif /* CONFIG_SUNRPC_XPRT_RDMA */ #endif /* IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA) */
rpc_set_port(data->addr, NFS_PORT); rpc_set_port(data->addr, NFS_PORT);
error = nfs4_set_client(server, data->hostname, error = nfs4_set_client(server, data->hostname,
...@@ -1153,7 +1153,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data, ...@@ -1153,7 +1153,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
if (error < 0) if (error < 0)
goto error; goto error;
#ifdef CONFIG_SUNRPC_XPRT_RDMA #if IS_ENABLED(CONFIG_SUNRPC_XPRT_RDMA)
init_server: init_server:
#endif #endif
error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor); error = nfs_init_server_rpcclient(server, parent_server->client->cl_timeout, data->authflavor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment