Re: [PATCH v4 06/10] scsi: export scsi_mq_uninit_cmnd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 03, 2020 at 07:12:46PM +0900, Johannes Thumshirn wrote:
> scsi_mq_uninit_cmnd is used to free the sg_tables, uninitialize the
> command and delete it from the command list.
> 
> Export this function so it can be used from modular code to free the
> memory allocated by scsi_init_io() if the caller of scsi_init_io() needs
> to do error recovery.

Hmm.  scsi_mq_uninit_cmnd does three things:

 - calls ->uninit_command, but that is something the driver can
   trivially do itself.
 - scsi_mq_free_sgtables - yes, this would need to be done by the driver
   and actually is what undoes scsi_init_io.  I think you want to export
   this instead (and remove the _mq in the name while you are at it)
 - scsi_del_cmd_from_list - this undoes scsi_add_cmd_to_list, which
   is not related to what the upper level driver does



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux