aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernfs.h
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 /include/linux/kernfs.h
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 'include/linux/kernfs.h')
-rw-r--r--include/linux/kernfs.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index d4e01b358341..71ecdab1671b 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -43,7 +43,6 @@ enum kernfs_node_flag {
43 KERNFS_HAS_SEQ_SHOW = 0x0040, 43 KERNFS_HAS_SEQ_SHOW = 0x0040,
44 KERNFS_HAS_MMAP = 0x0080, 44 KERNFS_HAS_MMAP = 0x0080,
45 KERNFS_LOCKDEP = 0x0100, 45 KERNFS_LOCKDEP = 0x0100,
46 KERNFS_STATIC_NAME = 0x0200,
47 KERNFS_SUICIDAL = 0x0400, 46 KERNFS_SUICIDAL = 0x0400,
48 KERNFS_SUICIDED = 0x0800, 47 KERNFS_SUICIDED = 0x0800,
49}; 48};
@@ -291,7 +290,6 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
291 umode_t mode, loff_t size, 290 umode_t mode, loff_t size,
292 const struct kernfs_ops *ops, 291 const struct kernfs_ops *ops,
293 void *priv, const void *ns, 292 void *priv, const void *ns,
294 bool name_is_static,
295 struct lock_class_key *key); 293 struct lock_class_key *key);
296struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, 294struct kernfs_node *kernfs_create_link(struct kernfs_node *parent,
297 const char *name, 295 const char *name,
@@ -369,8 +367,7 @@ kernfs_create_dir_ns(struct kernfs_node *parent, const char *name,
369static inline struct kernfs_node * 367static inline struct kernfs_node *
370__kernfs_create_file(struct kernfs_node *parent, const char *name, 368__kernfs_create_file(struct kernfs_node *parent, const char *name,
371 umode_t mode, loff_t size, const struct kernfs_ops *ops, 369 umode_t mode, loff_t size, const struct kernfs_ops *ops,
372 void *priv, const void *ns, bool name_is_static, 370 void *priv, const void *ns, struct lock_class_key *key)
373 struct lock_class_key *key)
374{ return ERR_PTR(-ENOSYS); } 371{ return ERR_PTR(-ENOSYS); }
375 372
376static inline struct kernfs_node * 373static inline struct kernfs_node *
@@ -439,7 +436,7 @@ kernfs_create_file_ns(struct kernfs_node *parent, const char *name,
439 key = (struct lock_class_key *)&ops->lockdep_key; 436 key = (struct lock_class_key *)&ops->lockdep_key;
440#endif 437#endif
441 return __kernfs_create_file(parent, name, mode, size, ops, priv, ns, 438 return __kernfs_create_file(parent, name, mode, size, ops, priv, ns,
442 false, key); 439 key);
443} 440}
444 441
445static inline struct kernfs_node * 442static inline struct kernfs_node *