Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ec193cf5
Commit
ec193cf5
authored
Jul 14, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configfs: don't open-code d_alloc_name()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d3db90b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
fs/configfs/dir.c
fs/configfs/dir.c
+2
-11
No files found.
fs/configfs/dir.c
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment