From: Christof Schmitt Date: Fri, 17 Apr 2009 13:08:14 +0000 (+0200) Subject: [SCSI] zfcp: Reference counting for cfdc requests X-Git-Tag: v2.6.30-rc5~53^2~33 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3869bb6e73f5f55ce16b13025726b0bfdf1f4aae;p=karo-tx-linux.git [SCSI] zfcp: Reference counting for cfdc requests Before dropping the reference count with zfcp_adapter_put, increase it with zfcp_adapter_get when issuing cfdc requests. Reviewed-by: Martin Petermann Signed-off-by: Christof Schmitt Signed-off-by: James Bottomley --- diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c index 10cbfd172a28..8305c874e86f 100644 --- a/drivers/s390/scsi/zfcp_cfdc.c +++ b/drivers/s390/scsi/zfcp_cfdc.c @@ -4,7 +4,7 @@ * Userspace interface for accessing the * Access Control Lists / Control File Data Channel * - * Copyright IBM Corporation 2008 + * Copyright IBM Corporation 2008, 2009 */ #define KMSG_COMPONENT "zfcp" @@ -197,6 +197,7 @@ static long zfcp_cfdc_dev_ioctl(struct file *file, unsigned int command, retval = -ENXIO; goto free_buffer; } + zfcp_adapter_get(adapter); retval = zfcp_cfdc_sg_setup(data->command, fsf_cfdc->sg, data_user->control_file);