aboutsummaryrefslogtreecommitdiffstats
path: root/fs/kernfs/file.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-02-13 17:36:31 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-14 00:21:36 -0500
commitdfeb0750b630b72b5d4fb2461bc7179eceb54666 (patch)
tree22af2116c4b061fd8ce268f78f56696e0a21c5c1 /fs/kernfs/file.c
parent75287a677ba1beab7ca0db948468f44eb23a709f (diff)
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/kernfs/file.c')
-rw-r--r--fs/kernfs/file.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index ddc9f9612f16..b684e8a132e6 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -901,7 +901,6 @@ const struct file_operations kernfs_file_fops = {
901 * @ops: kernfs operations for the file 901 * @ops: kernfs operations for the file
902 * @priv: private data for the file 902 * @priv: private data for the file
903 * @ns: optional namespace tag of the file 903 * @ns: optional namespace tag of the file
904 * @name_is_static: don't copy file name
905 * @key: lockdep key for the file's active_ref, %NULL to disable lockdep 904 * @key: lockdep key for the file's active_ref, %NULL to disable lockdep
906 * 905 *
907 * Returns the created node on success, ERR_PTR() value on error. 906 * Returns the created node on success, ERR_PTR() value on error.
@@ -911,7 +910,6 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
911 umode_t mode, loff_t size, 910 umode_t mode, loff_t size,
912 const struct kernfs_ops *ops, 911 const struct kernfs_ops *ops,
913 void *priv, const void *ns, 912 void *priv, const void *ns,
914 bool name_is_static,
915 struct lock_class_key *key) 913 struct lock_class_key *key)
916{ 914{
917 struct kernfs_node *kn; 915 struct kernfs_node *kn;
@@ -919,8 +917,6 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
919 int rc; 917 int rc;
920 918
921 flags = KERNFS_FILE; 919 flags = KERNFS_FILE;
922 if (name_is_static)
923 flags |= KERNFS_STATIC_NAME;
924 920
925 kn = kernfs_new_node(parent, name, (mode & S_IALLUGO) | S_IFREG, flags); 921 kn = kernfs_new_node(parent, name, (mode & S_IALLUGO) | S_IFREG, flags);
926 if (!kn) 922 if (!kn)