diff options
author | santosh.shilimkar@oracle.com <santosh.shilimkar@oracle.com> | 2015-08-22 15:45:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-25 13:35:29 -0700 |
commit | 1d2e3f396c532b95a37bbee92269f37efe908457 (patch) | |
tree | 333d436a1ea25be685df37c11caa288112136312 | |
parent | 43e122b014c955a33220fabbd09c4b5e4f422c3c (diff) | |
download | linux-1d2e3f396c532b95a37bbee92269f37efe908457.tar.gz linux-1d2e3f396c532b95a37bbee92269f37efe908457.tar.bz2 linux-1d2e3f396c532b95a37bbee92269f37efe908457.zip |
RDS: restore return value in rds_cmsg_rdma_args()
In rds_cmsg_rdma_args() 'ret' is used by rds_pin_pages() which returns
number of pinned pages on success. And the same value is returned to the
caller of rds_cmsg_rdma_args() on success which is not intended.
Commit f4a3fc03c1d7 ("RDS: Clean up error handling in rds_cmsg_rdma_args")
removed the 'ret = 0' line which broke RDS RDMA mode.
Fix it by restoring the return value on rds_pin_pages() success
keeping the clean-up in place.
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/rds/rdma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 40084d843e9f..6401b501a215 100644 --- a/net/rds/rdma.c +++ b/net/rds/rdma.c @@ -658,6 +658,8 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, ret = rds_pin_pages(iov->addr, nr, pages, !op->op_write); if (ret < 0) goto out; + else + ret = 0; rdsdebug("RDS: nr_bytes %u nr %u iov->bytes %llu iov->addr %llx\n", nr_bytes, nr, iov->bytes, iov->addr); |