target: simplify the target template registration API
Instead of calling target_fabric_configfs_init() + target_fabric_configfs_register() / target_fabric_configfs_deregister() target_fabric_configfs_free() from every target driver, rewrite the API so that we have simple register/unregister functions that operate on a const operations vector. This patch also fixes a memory leak in several target drivers. Several target drivers namely called target_fabric_configfs_deregister() without calling target_fabric_configfs_free(). A large part of this patch is based on earlier changes from Bart Van Assche <bart.vanassche@sandisk.com>. (v2: Add a new TF_CIT_SETUP_DRV macro so that the core configfs code can declare attributes as either core only or for drivers) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
此提交包含在:
@@ -129,7 +129,6 @@ struct ft_cmd {
|
||||
|
||||
extern struct mutex ft_lport_lock;
|
||||
extern struct fc4_prov ft_prov;
|
||||
extern struct target_fabric_configfs *ft_configfs;
|
||||
extern unsigned int ft_debug_logging;
|
||||
|
||||
/*
|
||||
|
新增問題並參考
封鎖使用者