Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxime Buquet
linux
Commits
ec193cf5
Commit
ec193cf5
authored
11 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
configfs: don't open-code d_alloc_name()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d3db90b0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/configfs/dir.c
+2
-11
2 additions, 11 deletions
fs/configfs/dir.c
with
2 additions
and
11 deletions
fs/configfs/dir.c
+
2
−
11
View file @
ec193cf5
...
...
@@ -660,19 +660,15 @@ static int create_default_group(struct config_group *parent_group,
struct
config_group
*
group
)
{
int
ret
;
struct
qstr
name
;
struct
configfs_dirent
*
sd
;
/* We trust the caller holds a reference to parent */
struct
dentry
*
child
,
*
parent
=
parent_group
->
cg_item
.
ci_dentry
;
if
(
!
group
->
cg_item
.
ci_name
)
group
->
cg_item
.
ci_name
=
group
->
cg_item
.
ci_namebuf
;
name
.
name
=
group
->
cg_item
.
ci_name
;
name
.
len
=
strlen
(
name
.
name
);
name
.
hash
=
full_name_hash
(
name
.
name
,
name
.
len
);
ret
=
-
ENOMEM
;
child
=
d_alloc
(
parent
,
&
name
);
child
=
d_alloc
_name
(
parent
,
group
->
cg_item
.
ci_
name
);
if
(
child
)
{
d_add
(
child
,
NULL
);
...
...
@@ -1650,7 +1646,6 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)
{
int
err
;
struct
config_group
*
group
=
&
subsys
->
su_group
;
struct
qstr
name
;
struct
dentry
*
dentry
;
struct
dentry
*
root
;
struct
configfs_dirent
*
sd
;
...
...
@@ -1667,12 +1662,8 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)
mutex_lock_nested
(
&
root
->
d_inode
->
i_mutex
,
I_MUTEX_PARENT
);
name
.
name
=
group
->
cg_item
.
ci_name
;
name
.
len
=
strlen
(
name
.
name
);
name
.
hash
=
full_name_hash
(
name
.
name
,
name
.
len
);
err
=
-
ENOMEM
;
dentry
=
d_alloc
(
root
,
&
name
);
dentry
=
d_alloc
_name
(
root
,
group
->
cg_item
.
ci_
name
);
if
(
dentry
)
{
d_add
(
dentry
,
NULL
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment