scsi: megaraid_sas: add correct return type check for ldio hint logic for raid1
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 10 Mar 2017 11:22:13 +0000 (03:22 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Mar 2017 02:59:53 +0000 (22:59 -0400)
commit49524b3c6e12375627ddd870613fcc6b24909898
tree766631ea51d8ccc2bb1269c31a1e0570151a509e
parent64ff64b90e62c860772fd0be50b7cfcef1d8a9b2
scsi: megaraid_sas: add correct return type check for ldio hint logic for raid1

Return value check of atomic_dec_if_positive is required as it returns
old value minus one.  Without this fix, driver will send small ios to
firmware path and that will be a performance issue.

Not critical, but good to have r1_ldio_hint as default value in sdev
private.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/megaraid/megaraid_sas_fusion.c