aboutsummaryrefslogtreecommitdiffstats
path: root/fs/configfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-14 14:42:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-14 14:42:26 -0400
commit41d9884c44237cd66e2bdbc412028b29196b344c (patch)
tree7a386f6de2f07c01f87f3a16965c9bb8b40f63c1 /fs/configfs
parent63345b4794aef4ebe16502cfe35b02bc9822d763 (diff)
parentdae3794fd603b92dcbac2859fe0bc7fe129a5188 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs stuff from Al Viro: "O_TMPFILE ABI changes, Oleg's fput() series, misc cleanups, including making simple_lookup() usable for filesystems with non-NULL s_d_op, which allows us to get rid of quite a bit of ugliness" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sunrpc: now we can just set ->s_d_op cgroup: we can use simple_lookup() now efivarfs: we can use simple_lookup() now make simple_lookup() usable for filesystems that set ->s_d_op configfs: don't open-code d_alloc_name() __rpc_lookup_create_exclusive: pass string instead of qstr rpc_create_*_dir: don't bother with qstr llist: llist_add() can use llist_add_batch() llist: fix/simplify llist_add() and llist_add_batch() fput: turn "list_head delayed_fput_list" into llist_head fs/file_table.c:fput(): add comment Safer ABI for O_TMPFILE
Diffstat (limited to 'fs/configfs')
-rw-r--r--fs/configfs/dir.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 5e7c60c1cb63..277bd1be21fd 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -660,19 +660,15 @@ static int create_default_group(struct config_group *parent_group,
660 struct config_group *group) 660 struct config_group *group)
661{ 661{
662 int ret; 662 int ret;
663 struct qstr name;
664 struct configfs_dirent *sd; 663 struct configfs_dirent *sd;
665 /* We trust the caller holds a reference to parent */ 664 /* We trust the caller holds a reference to parent */
666 struct dentry *child, *parent = parent_group->cg_item.ci_dentry; 665 struct dentry *child, *parent = parent_group->cg_item.ci_dentry;
667 666
668 if (!group->cg_item.ci_name) 667 if (!group->cg_item.ci_name)
669 group->cg_item.ci_name = group->cg_item.ci_namebuf; 668 group->cg_item.ci_name = group->cg_item.ci_namebuf;
670 name.name = group->cg_item.ci_name;
671 name.len = strlen(name.name);
672 name.hash = full_name_hash(name.name, name.len);
673 669
674 ret = -ENOMEM; 670 ret = -ENOMEM;
675 child = d_alloc(parent, &name); 671 child = d_alloc_name(parent, group->cg_item.ci_name);
676 if (child) { 672 if (child) {
677 d_add(child, NULL); 673 d_add(child, NULL);
678 674
@@ -1650,7 +1646,6 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)
1650{ 1646{
1651 int err; 1647 int err;
1652 struct config_group *group = &subsys->su_group; 1648 struct config_group *group = &subsys->su_group;
1653 struct qstr name;
1654 struct dentry *dentry; 1649 struct dentry *dentry;
1655 struct dentry *root; 1650 struct dentry *root;
1656 struct configfs_dirent *sd; 1651 struct configfs_dirent *sd;
@@ -1667,12 +1662,8 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)
1667 1662
1668 mutex_lock_nested(&root->d_inode->i_mutex, I_MUTEX_PARENT); 1663 mutex_lock_nested(&root->d_inode->i_mutex, I_MUTEX_PARENT);
1669 1664
1670 name.name = group->cg_item.ci_name;
1671 name.len = strlen(name.name);
1672 name.hash = full_name_hash(name.name, name.len);
1673
1674 err = -ENOMEM; 1665 err = -ENOMEM;
1675 dentry = d_alloc(root, &name); 1666 dentry = d_alloc_name(root, group->cg_item.ci_name);
1676 if (dentry) { 1667 if (dentry) {
1677 d_add(dentry, NULL); 1668 d_add(dentry, NULL);
1678 1669