Commit 85e6a6ad authored by James Smart's avatar James Smart Committed by Jens Axboe
Browse files

nvme-fc: require target or discovery role for fc-nvme targets

In order to create an association, the remoteport must be
serving either a target role or a discovery role.
Signed-off-by: default avatarJames Smart <>
Reviewed-by: default avatarJohannes Thumshirn <>
Signed-off-by: default avatarChristoph Hellwig <>
Signed-off-by: default avatarJens Axboe <>
parent 41231090
......@@ -2720,6 +2720,12 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
unsigned long flags;
int ret, idx;
if (!(rport->remoteport.port_role &
ret = -EBADR;
goto out_fail;
ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
if (!ctrl) {
ret = -ENOMEM;
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