diff options
author | Tejun Heo | 2015-02-13 23:36:31 +0100 |
---|---|---|
committer | Linus Torvalds | 2015-02-14 06:21:36 +0100 |
commit | dfeb0750b630b72b5d4fb2461bc7179eceb54666 (patch) | |
tree | 22af2116c4b061fd8ce268f78f56696e0a21c5c1 /fs/sysfs | |
parent | kernfs: convert node name allocation to kstrdup_const (diff) | |
download | kernel-qcow2-linux-dfeb0750b630b72b5d4fb2461bc7179eceb54666.tar.gz kernel-qcow2-linux-dfeb0750b630b72b5d4fb2461bc7179eceb54666.tar.xz kernel-qcow2-linux-dfeb0750b630b72b5d4fb2461bc7179eceb54666.zip |
kernfs: remove KERNFS_STATIC_NAME
When a new kernfs node is created, KERNFS_STATIC_NAME is used to avoid
making a separate copy of its name. It's currently only used for sysfs
attributes whose filenames are required to stay accessible and unchanged.
There are rare exceptions where these names are allocated and formatted
dynamically but for the vast majority of cases they're consts in the
rodata section.
Now that kernfs is converted to use kstrdup_const() and kfree_const(),
there's little point in keeping KERNFS_STATIC_NAME around. Remove it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index dfe928a9540f..7c2867b44141 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -295,7 +295,7 @@ int sysfs_add_file_mode_ns(struct kernfs_node *parent, key = attr->key ?: (struct lock_class_key *)&attr->skey; #endif kn = __kernfs_create_file(parent, attr->name, mode & 0777, size, ops, - (void *)attr, ns, true, key); + (void *)attr, ns, key); if (IS_ERR(kn)) { if (PTR_ERR(kn) == -EEXIST) sysfs_warn_dup(parent, attr->name); |