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 --- include/linux/configfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/configfs.h') diff --git a/include/linux/configfs.h b/include/linux/configfs.h index d9d6a9d77489..9a30b921f740 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h @@ -228,7 +228,7 @@ static struct configfs_bin_attribute _pfx##attr_##_name = { \ struct configfs_item_operations { void (*release)(struct config_item *); int (*allow_link)(struct config_item *src, struct config_item *target); - int (*drop_link)(struct config_item *src, struct config_item *target); + void (*drop_link)(struct config_item *src, struct config_item *target); }; struct configfs_group_operations { -- cgit v1.2.3-59-g8ed1b