]> git.baikalelectronics.ru Git - kernel.git/commit
RDS: restore return value in rds_cmsg_rdma_args()
authorsantosh.shilimkar@oracle.com <santosh.shilimkar@oracle.com>
Sat, 22 Aug 2015 22:45:22 +0000 (15:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Aug 2015 20:35:29 +0000 (13:35 -0700)
commit6b8079301bd0501a8c6b802ae5c49d74a4841e31
tree333d436a1ea25be685df37c11caa288112136312
parent0c515c21e37650bcaf239743b6731273760ac7a3
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 e1d1a4fc7b4d ("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>
net/rds/rdma.c