When parsing the discovery entries results in invalid parameters
for a given connection we'll enter an infinite loop as the -EINVAL
error code is always assumed to indicate a wrong 'disable_sqflow'
setting.
Signed-off-by: Hannes Reinecke <hare@suse.de>
ret = do_discover(argstr, true, flags);
} else
ret = add_ctrl(argstr);
- if (ret == -EINVAL && e->treq & NVMF_TREQ_DISABLE_SQFLOW) {
+ if (ret == -EINVAL && disable_sqflow &&
+ e->treq & NVMF_TREQ_DISABLE_SQFLOW) {
/* disable_sqflow param might not be supported, try without it */
disable_sqflow = false;
goto retry;