mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:04:44 +01:00
dlm: Constify struct configfs_item_operations and configfs_group_operations
'struct configfs_item_operations' and 'configfs_group_operations' are not modified in this driver. Constifying these structures moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 29436 12952 384 42772 a714 fs/dlm/config.o After: ===== text data bss dec hex filename 30076 12312 384 42772 a714 fs/dlm/config.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
6155b40976
commit
596ce53d64
1 changed files with 8 additions and 8 deletions
|
|
@ -324,39 +324,39 @@ struct dlm_member_gone {
|
|||
struct list_head list; /* space->members_gone */
|
||||
};
|
||||
|
||||
static struct configfs_group_operations clusters_ops = {
|
||||
static const struct configfs_group_operations clusters_ops = {
|
||||
.make_group = make_cluster,
|
||||
.drop_item = drop_cluster,
|
||||
};
|
||||
|
||||
static struct configfs_item_operations cluster_ops = {
|
||||
static const struct configfs_item_operations cluster_ops = {
|
||||
.release = release_cluster,
|
||||
};
|
||||
|
||||
static struct configfs_group_operations spaces_ops = {
|
||||
static const struct configfs_group_operations spaces_ops = {
|
||||
.make_group = make_space,
|
||||
.drop_item = drop_space,
|
||||
};
|
||||
|
||||
static struct configfs_item_operations space_ops = {
|
||||
static const struct configfs_item_operations space_ops = {
|
||||
.release = release_space,
|
||||
};
|
||||
|
||||
static struct configfs_group_operations comms_ops = {
|
||||
static const struct configfs_group_operations comms_ops = {
|
||||
.make_item = make_comm,
|
||||
.drop_item = drop_comm,
|
||||
};
|
||||
|
||||
static struct configfs_item_operations comm_ops = {
|
||||
static const struct configfs_item_operations comm_ops = {
|
||||
.release = release_comm,
|
||||
};
|
||||
|
||||
static struct configfs_group_operations nodes_ops = {
|
||||
static const struct configfs_group_operations nodes_ops = {
|
||||
.make_item = make_node,
|
||||
.drop_item = drop_node,
|
||||
};
|
||||
|
||||
static struct configfs_item_operations node_ops = {
|
||||
static const struct configfs_item_operations node_ops = {
|
||||
.release = release_node,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue