iscsi class: fix get_host_stats return code when not supported
authorMike Christie <michaelc@cs.wisc.edu>
Sat, 12 Jul 2014 20:51:50 +0000 (15:51 -0500)
committerChristoph Hellwig <hch@lst.de>
Fri, 1 Aug 2014 12:16:39 +0000 (08:16 -0400)
When the get_host_stats call was not supported we were
returing EINVAL. This has us return ENOSYS, because for
software iscsi drivers where there is no host it is ok to not
have this callout.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi_transport_iscsi.c

index 14bfa53c6f7dd45ba19731f2a7198f73ae40ba13..534d3fb87658500b928e658bf4d00ea48800306c 100644 (file)
@@ -3429,7 +3429,7 @@ iscsi_get_host_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh)
        char *buf;
 
        if (!transport->get_host_stats)
-               return -EINVAL;
+               return -ENOSYS;
 
        priv = iscsi_if_transport_lookup(transport);
        if (!priv)