net/smc: fix suppressed return code
The patch that repaired the invalid return code in smcd_new_buf_create() missed to take care of errno ENOSPC which has a special meaning that no more DMBEs can be registered on the device. Fix that by keeping this errno value during the translation of the return code. Fixes: 6b1bbf94ab36 ("net/smc: fix invalid return code in smcd_new_buf_create()") Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
4a9baf45fd
commit
96d6fded95
@ -1615,8 +1615,11 @@ static struct smc_buf_desc *smcd_new_buf_create(struct smc_link_group *lgr,
|
||||
rc = smc_ism_register_dmb(lgr, bufsize, buf_desc);
|
||||
if (rc) {
|
||||
kfree(buf_desc);
|
||||
return (rc == -ENOMEM) ? ERR_PTR(-EAGAIN) :
|
||||
ERR_PTR(-EIO);
|
||||
if (rc == -ENOMEM)
|
||||
return ERR_PTR(-EAGAIN);
|
||||
if (rc == -ENOSPC)
|
||||
return ERR_PTR(-ENOSPC);
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
buf_desc->pages = virt_to_page(buf_desc->cpu_addr);
|
||||
/* CDC header stored in buf. So, pretend it was smaller */
|
||||
|
Loading…
x
Reference in New Issue
Block a user