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
0507c78a
Commit
0507c78a
authored
Jul 19, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ibmasmfs: don't bother passing superblock when not needed
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
a118cfdf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
drivers/misc/ibmasm/ibmasmfs.c
drivers/misc/ibmasm/ibmasmfs.c
+12
-14
No files found.
drivers/misc/ibmasm/ibmasmfs.c
View file @
0507c78a
...
...
@@ -149,8 +149,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
return
ret
;
}
static
struct
dentry
*
ibmasmfs_create_file
(
struct
super_block
*
sb
,
struct
dentry
*
parent
,
static
struct
dentry
*
ibmasmfs_create_file
(
struct
dentry
*
parent
,
const
char
*
name
,
const
struct
file_operations
*
fops
,
void
*
data
,
...
...
@@ -163,7 +162,7 @@ static struct dentry *ibmasmfs_create_file (struct super_block *sb,
if
(
!
dentry
)
return
NULL
;
inode
=
ibmasmfs_make_inode
(
sb
,
S_IFREG
|
mode
);
inode
=
ibmasmfs_make_inode
(
parent
->
d_
sb
,
S_IFREG
|
mode
);
if
(
!
inode
)
{
dput
(
dentry
);
return
NULL
;
...
...
@@ -176,8 +175,7 @@ static struct dentry *ibmasmfs_create_file (struct super_block *sb,
return
dentry
;
}
static
struct
dentry
*
ibmasmfs_create_dir
(
struct
super_block
*
sb
,
struct
dentry
*
parent
,
static
struct
dentry
*
ibmasmfs_create_dir
(
struct
dentry
*
parent
,
const
char
*
name
)
{
struct
dentry
*
dentry
;
...
...
@@ -187,7 +185,7 @@ static struct dentry *ibmasmfs_create_dir (struct super_block *sb,
if
(
!
dentry
)
return
NULL
;
inode
=
ibmasmfs_make_inode
(
sb
,
S_IFDIR
|
0500
);
inode
=
ibmasmfs_make_inode
(
parent
->
d_
sb
,
S_IFDIR
|
0500
);
if
(
!
inode
)
{
dput
(
dentry
);
return
NULL
;
...
...
@@ -612,20 +610,20 @@ static void ibmasmfs_create_files (struct super_block *sb)
struct
dentry
*
dir
;
struct
dentry
*
remote_dir
;
sp
=
list_entry
(
entry
,
struct
service_processor
,
node
);
dir
=
ibmasmfs_create_dir
(
sb
,
sb
->
s_root
,
sp
->
dirname
);
dir
=
ibmasmfs_create_dir
(
sb
->
s_root
,
sp
->
dirname
);
if
(
!
dir
)
continue
;
ibmasmfs_create_file
(
sb
,
dir
,
"command"
,
&
command_fops
,
sp
,
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
sb
,
dir
,
"event"
,
&
event_fops
,
sp
,
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
sb
,
dir
,
"reverse_heartbeat"
,
&
r_heartbeat_fops
,
sp
,
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
dir
,
"command"
,
&
command_fops
,
sp
,
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
dir
,
"event"
,
&
event_fops
,
sp
,
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
dir
,
"reverse_heartbeat"
,
&
r_heartbeat_fops
,
sp
,
S_IRUSR
|
S_IWUSR
);
remote_dir
=
ibmasmfs_create_dir
(
sb
,
dir
,
"remote_video"
);
remote_dir
=
ibmasmfs_create_dir
(
dir
,
"remote_video"
);
if
(
!
remote_dir
)
continue
;
ibmasmfs_create_file
(
sb
,
remote_dir
,
"width"
,
&
remote_settings_fops
,
(
void
*
)
display_width
(
sp
),
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
sb
,
remote_dir
,
"height"
,
&
remote_settings_fops
,
(
void
*
)
display_height
(
sp
),
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
sb
,
remote_dir
,
"depth"
,
&
remote_settings_fops
,
(
void
*
)
display_depth
(
sp
),
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
remote_dir
,
"width"
,
&
remote_settings_fops
,
(
void
*
)
display_width
(
sp
),
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
remote_dir
,
"height"
,
&
remote_settings_fops
,
(
void
*
)
display_height
(
sp
),
S_IRUSR
|
S_IWUSR
);
ibmasmfs_create_file
(
remote_dir
,
"depth"
,
&
remote_settings_fops
,
(
void
*
)
display_depth
(
sp
),
S_IRUSR
|
S_IWUSR
);
}
}
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