diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2016-11-28 13:22:42 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2016-12-01 10:50:49 +0100 |
commit | e16769d4bca67218531505ad1a8365d227fedcf9 (patch) | |
tree | a60ede285d2cb1c296139c7bd1b95309e29a256b /drivers/target | |
parent | Linux 4.9-rc7 (diff) | |
download | linux-e16769d4bca67218531505ad1a8365d227fedcf9.tar.xz linux-e16769d4bca67218531505ad1a8365d227fedcf9.zip |
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 <andrzej.p@samsung.com>
[hch: reverted reformatting of some code]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_fabric_configfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index 31a096aa16ab..d8a16ca6baa5 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) |