From e16769d4bca67218531505ad1a8365d227fedcf9 Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Mon, 28 Nov 2016 13:22:42 +0100 Subject: fs: configfs: don't return anything from drop_link Documentation/filesystems/configfs/configfs.txt says: "When unlink(2) is called on the symbolic link, the source item is notified via the ->drop_link() method. Like the ->drop_item() method, this is a void function and cannot return failure." The ->drop_item() is indeed a void function, the ->drop_link() is actually not. This, together with the fact that the value of ->drop_link() is silently ignored suggests, that it is the ->drop_link() return type that should be corrected and changed to void. This patch changes drop_link() signature and all its users. Signed-off-by: Andrzej Pietrasiewicz [hch: reverted reformatting of some code] Signed-off-by: Christoph Hellwig --- drivers/target/target_core_fabric_configfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/target') diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index 31a096aa16aba..d8a16ca6baa50 100644 --- a/drivers/target/target_core_fabric_configfs.c +++ b/drivers/target/target_core_fabric_configfs.c @@ -137,7 +137,7 @@ static int target_fabric_mappedlun_link( return core_dev_add_initiator_node_lun_acl(se_tpg, lacl, lun, lun_access_ro); } -static int target_fabric_mappedlun_unlink( +static void target_fabric_mappedlun_unlink( struct config_item *lun_acl_ci, struct config_item *lun_ci) { @@ -146,7 +146,7 @@ static int target_fabric_mappedlun_unlink( struct se_lun *lun = container_of(to_config_group(lun_ci), struct se_lun, lun_group); - return core_dev_del_initiator_node_lun_acl(lun, lacl); + core_dev_del_initiator_node_lun_acl(lun, lacl); } static struct se_lun_acl *item_to_lun_acl(struct config_item *item) @@ -669,7 +669,7 @@ out: return ret; } -static int target_fabric_port_unlink( +static void target_fabric_port_unlink( struct config_item *lun_ci, struct config_item *se_dev_ci) { @@ -688,7 +688,6 @@ static int target_fabric_port_unlink( } core_dev_del_lun(se_tpg, lun); - return 0; } static void target_fabric_port_release(struct config_item *item) -- cgit v1.2.3