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
ac481d6c
Commit
ac481d6c
authored
Jun 09, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugfs: get rid of useless arguments to debugfs_{mkdir,symlink}
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
cfa57c11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
fs/debugfs/inode.c
fs/debugfs/inode.c
+9
-11
No files found.
fs/debugfs/inode.c
View file @
ac481d6c
...
@@ -54,13 +54,12 @@ static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev
...
@@ -54,13 +54,12 @@ static struct inode *debugfs_get_inode(struct super_block *sb, umode_t mode, dev
break
;
break
;
case
S_IFLNK
:
case
S_IFLNK
:
inode
->
i_op
=
&
debugfs_link_operations
;
inode
->
i_op
=
&
debugfs_link_operations
;
inode
->
i_fop
=
fops
;
inode
->
i_private
=
data
;
inode
->
i_private
=
data
;
break
;
break
;
case
S_IFDIR
:
case
S_IFDIR
:
inode
->
i_op
=
&
simple_dir_inode_operations
;
inode
->
i_op
=
&
simple_dir_inode_operations
;
inode
->
i_fop
=
fops
?
fops
:
&
simple_dir_operations
;
inode
->
i_fop
=
&
simple_dir_operations
;
inode
->
i_private
=
data
;
inode
->
i_private
=
NULL
;
/* directory inodes start off with i_nlink == 2
/* directory inodes start off with i_nlink == 2
* (for "." entry) */
* (for "." entry) */
...
@@ -91,13 +90,12 @@ static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
...
@@ -91,13 +90,12 @@ static int debugfs_mknod(struct inode *dir, struct dentry *dentry,
return
error
;
return
error
;
}
}
static
int
debugfs_mkdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
static
int
debugfs_mkdir
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
)
void
*
data
,
const
struct
file_operations
*
fops
)
{
{
int
res
;
int
res
;
mode
=
(
mode
&
(
S_IRWXUGO
|
S_ISVTX
))
|
S_IFDIR
;
mode
=
(
mode
&
(
S_IRWXUGO
|
S_ISVTX
))
|
S_IFDIR
;
res
=
debugfs_mknod
(
dir
,
dentry
,
mode
,
0
,
data
,
fops
);
res
=
debugfs_mknod
(
dir
,
dentry
,
mode
,
0
,
NULL
,
NULL
);
if
(
!
res
)
{
if
(
!
res
)
{
inc_nlink
(
dir
);
inc_nlink
(
dir
);
fsnotify_mkdir
(
dir
,
dentry
);
fsnotify_mkdir
(
dir
,
dentry
);
...
@@ -106,10 +104,10 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode,
...
@@ -106,10 +104,10 @@ static int debugfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode,
}
}
static
int
debugfs_link
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
static
int
debugfs_link
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
void
*
data
,
const
struct
file_operations
*
fops
)
void
*
data
)
{
{
mode
=
(
mode
&
S_IALLUGO
)
|
S_IFLNK
;
mode
=
(
mode
&
S_IALLUGO
)
|
S_IFLNK
;
return
debugfs_mknod
(
dir
,
dentry
,
mode
,
0
,
data
,
fops
);
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
inode
*
dir
,
struct
dentry
*
dentry
,
umode_t
mode
,
...
@@ -321,12 +319,12 @@ struct dentry *__create_file(const char *name, umode_t mode,
...
@@ -321,12 +319,12 @@ struct dentry *__create_file(const char *name, umode_t mode,
if
(
!
IS_ERR
(
dentry
))
{
if
(
!
IS_ERR
(
dentry
))
{
switch
(
mode
&
S_IFMT
)
{
switch
(
mode
&
S_IFMT
)
{
case
S_IFDIR
:
case
S_IFDIR
:
error
=
debugfs_mkdir
(
parent
->
d_inode
,
dentry
,
mode
,
error
=
debugfs_mkdir
(
parent
->
d_inode
,
dentry
,
mode
);
data
,
fops
);
break
;
break
;
case
S_IFLNK
:
case
S_IFLNK
:
error
=
debugfs_link
(
parent
->
d_inode
,
dentry
,
mode
,
error
=
debugfs_link
(
parent
->
d_inode
,
dentry
,
mode
,
data
,
fops
);
data
);
break
;
break
;
default:
default:
error
=
debugfs_create
(
parent
->
d_inode
,
dentry
,
mode
,
error
=
debugfs_create
(
parent
->
d_inode
,
dentry
,
mode
,
...
...
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