IB/iser: Return error to upper layers on EAGAIN registration failures
authorOr Gerlitz <ogerlitz@mellanox.com>
Wed, 1 May 2013 13:25:26 +0000 (13:25 +0000)
committerRoland Dreier <roland@purestorage.com>
Thu, 2 May 2013 00:34:13 +0000 (17:34 -0700)
Commit 819a087316a6 ("IB/iser: Avoid error prints on EAGAIN
registration failures") not only eliminated the error print on that
case, but rather also modified the code such that it doesn't return
any error to upper layers.  As a result a wrong mapping was used.  Fix
this to correctly return the error in that case.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/iser/iser_memory.c

index be1edb0..68ebb7f 100644 (file)
@@ -416,8 +416,9 @@ int iser_reg_rdma_mem(struct iscsi_iser_task *iser_task,
                        for (i=0 ; i<ib_conn->page_vec->length ; i++)
                                iser_err("page_vec[%d] = 0x%llx\n", i,
                                         (unsigned long long) ib_conn->page_vec->pages[i]);
-                       return err;
                }
+               if (err)
+                       return err;
        }
        return 0;
 }