RDMA/vmw_pvrdma: Use refcount_dec_and_test to avoid warning
authorBryan Tan <bryantan@vmware.com>
Wed, 20 Dec 2017 17:50:01 +0000 (09:50 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 21 Dec 2017 23:06:07 +0000 (16:06 -0700)
commit30a366a9dabd05a0d218288b7d732649886b6a53
tree91063c22f2e3d58d749f7f275a17f28da4e806a1
parent17748056ce123ee37fb7382bc698fc721e3c4a09
RDMA/vmw_pvrdma: Use refcount_dec_and_test to avoid warning

refcount_dec generates a warning when the operation
causes the refcount to hit zero. Avoid this by using
refcount_dec_and_test.

Fixes: 8b10ba783c9d ("RDMA/vmw_pvrdma: Add shared receive queue support")
Reviewed-by: Adit Ranadive <aditr@vmware.com>
Reviewed-by: Aditya Sarwade <asarwade@vmware.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Bryan Tan <bryantan@vmware.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/vmw_pvrdma/pvrdma_srq.c