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
5c90062c
Commit
5c90062c
authored
Feb 06, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Feb 06, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] (6/8) ->get_sb() switchover
converte usb to ->get_sb()
parent
19bdc672
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
drivers/usb/inode.c
drivers/usb/inode.c
+24
-6
No files found.
drivers/usb/inode.c
View file @
5c90062c
...
@@ -364,15 +364,14 @@ static struct super_operations usbfs_ops = {
...
@@ -364,15 +364,14 @@ static struct super_operations usbfs_ops = {
put_inode:
force_delete
,
put_inode:
force_delete
,
};
};
static
struct
super_block
*
usbfs_read_super
(
struct
super_block
*
sb
,
void
*
data
,
static
int
usbfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
int
silent
)
{
{
struct
inode
*
inode
;
struct
inode
*
inode
;
struct
dentry
*
root
;
struct
dentry
*
root
;
if
(
parse_options
(
sb
,
data
))
{
if
(
parse_options
(
sb
,
data
))
{
warn
(
"usbfs: mount parameter error:"
);
warn
(
"usbfs: mount parameter error:"
);
return
NUL
L
;
return
-
EINVA
L
;
}
}
sb
->
s_blocksize
=
PAGE_CACHE_SIZE
;
sb
->
s_blocksize
=
PAGE_CACHE_SIZE
;
...
@@ -383,17 +382,17 @@ static struct super_block *usbfs_read_super (struct super_block *sb, void *data,
...
@@ -383,17 +382,17 @@ static struct super_block *usbfs_read_super (struct super_block *sb, void *data,
if
(
!
inode
)
{
if
(
!
inode
)
{
dbg
(
"%s: could not get inode!
\n
"
,
__FUNCTION__
);
dbg
(
"%s: could not get inode!
\n
"
,
__FUNCTION__
);
return
NULL
;
return
-
ENOMEM
;
}
}
root
=
d_alloc_root
(
inode
);
root
=
d_alloc_root
(
inode
);
if
(
!
root
)
{
if
(
!
root
)
{
dbg
(
"%s: could not get root dentry!
\n
"
,
__FUNCTION__
);
dbg
(
"%s: could not get root dentry!
\n
"
,
__FUNCTION__
);
iput
(
inode
);
iput
(
inode
);
return
NULL
;
return
-
ENOMEM
;
}
}
sb
->
s_root
=
root
;
sb
->
s_root
=
root
;
return
sb
;
return
0
;
}
}
/**
/**
...
@@ -522,6 +521,25 @@ static void fs_remove_file (struct dentry *dentry)
...
@@ -522,6 +521,25 @@ static void fs_remove_file (struct dentry *dentry)
* It will be removed when the 2.7.x development cycle is started.
* It will be removed when the 2.7.x development cycle is started.
* You have been warned :)
* You have been warned :)
*/
*/
static
struct
super_block
*
usb_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
usb_fill_super
);
}
static
struct
file_system_type
usbdevice_fs_type
=
{
owner:
THIS_MODULE
,
name:
"usbdevfs"
,
get_sb:
usb_get_sb
,
};
static
struct
file_system_type
usb_fs_type
=
{
owner:
THIS_MODULE
,
name:
"usbfs"
,
get_sb:
usb_get_sb
,
};
static
DECLARE_FSTYPE
(
usbdevice_fs_type
,
"usbdevfs"
,
usbfs_read_super
,
FS_SINGLE
);
static
DECLARE_FSTYPE
(
usbdevice_fs_type
,
"usbdevfs"
,
usbfs_read_super
,
FS_SINGLE
);
static
DECLARE_FSTYPE
(
usb_fs_type
,
"usbfs"
,
usbfs_read_super
,
FS_SINGLE
);
static
DECLARE_FSTYPE
(
usb_fs_type
,
"usbfs"
,
usbfs_read_super
,
FS_SINGLE
);
...
...
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