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
Kirill Smelkov
linux
Commits
e09ddf36
Commit
e09ddf36
authored
Jan 25, 2015
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugfs_{mkdir,create,link}(): get rid of redundant argument
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
ec6f34e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
fs/debugfs/inode.c
fs/debugfs/inode.c
+9
-8
No files found.
fs/debugfs/inode.c
View file @
e09ddf36
...
...
@@ -89,8 +89,9 @@ static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
return
error
;
}
static
int
debugfs_mkdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
)
static
int
debugfs_mkdir
(
struct
dentry
*
dentry
,
umode_t
mode
)
{
struct
inode
*
dir
=
dentry
->
d_parent
->
d_inode
;
int
res
;
mode
=
(
mode
&
(
S_IRWXUGO
|
S_ISVTX
))
|
S_IFDIR
;
...
...
@@ -102,16 +103,18 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
return
res
;
}
static
int
debugfs_link
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
static
int
debugfs_link
(
struct
dentry
*
dentry
,
umode_t
mode
,
void
*
data
)
{
struct
inode
*
dir
=
dentry
->
d_parent
->
d_inode
;
mode
=
(
mode
&
S_IALLUGO
)
|
S_IFLNK
;
return
debugfs_mknod
(
dir
,
dentry
,
mode
,
0
,
data
,
NULL
);
}
static
int
debugfs_create
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
static
int
debugfs_create
(
struct
dentry
*
dentry
,
umode_t
mode
,
void
*
data
,
const
struct
file_operations
*
fops
)
{
struct
inode
*
dir
=
dentry
->
d_parent
->
d_inode
;
int
res
;
mode
=
(
mode
&
S_IALLUGO
)
|
S_IFREG
;
...
...
@@ -329,16 +332,14 @@ static struct dentry *__create_file(const char *name, umode_t mode,
if
(
!
IS_ERR
(
dentry
))
{
switch
(
mode
&
S_IFMT
)
{
case
S_IFDIR
:
error
=
debugfs_mkdir
(
parent
->
d_inode
,
dentry
,
mode
);
error
=
debugfs_mkdir
(
dentry
,
mode
);
break
;
case
S_IFLNK
:
error
=
debugfs_link
(
parent
->
d_inode
,
dentry
,
mode
,
data
);
error
=
debugfs_link
(
dentry
,
mode
,
data
);
break
;
default:
error
=
debugfs_create
(
parent
->
d_inode
,
dentry
,
mode
,
data
,
fops
);
error
=
debugfs_create
(
dentry
,
mode
,
data
,
fops
);
break
;
}
dput
(
dentry
);
...
...
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