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
d35f746f
Commit
d35f746f
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] (7/8) ->get_sb() switchover
converted ramfs/rootfs to ->get_sb(). Use get_sb_nodev() as helper.
parent
5c90062c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
fs/ramfs/inode.c
fs/ramfs/inode.c
+20
-6
No files found.
fs/ramfs/inode.c
View file @
d35f746f
...
@@ -302,7 +302,7 @@ static struct super_operations ramfs_ops = {
...
@@ -302,7 +302,7 @@ static struct super_operations ramfs_ops = {
put_inode:
force_delete
,
put_inode:
force_delete
,
};
};
static
struct
super_block
*
ramfs_read
_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
static
int
ramfs_fill
_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
{
struct
inode
*
inode
;
struct
inode
*
inode
;
struct
dentry
*
root
;
struct
dentry
*
root
;
...
@@ -313,19 +313,33 @@ static struct super_block *ramfs_read_super(struct super_block * sb, void * data
...
@@ -313,19 +313,33 @@ static struct super_block *ramfs_read_super(struct super_block * sb, void * data
sb
->
s_op
=
&
ramfs_ops
;
sb
->
s_op
=
&
ramfs_ops
;
inode
=
ramfs_get_inode
(
sb
,
S_IFDIR
|
0755
,
0
);
inode
=
ramfs_get_inode
(
sb
,
S_IFDIR
|
0755
,
0
);
if
(
!
inode
)
if
(
!
inode
)
return
NULL
;
return
-
ENOMEM
;
root
=
d_alloc_root
(
inode
);
root
=
d_alloc_root
(
inode
);
if
(
!
root
)
{
if
(
!
root
)
{
iput
(
inode
);
iput
(
inode
);
return
NULL
;
return
-
ENOMEM
;
}
}
sb
->
s_root
=
root
;
sb
->
s_root
=
root
;
return
sb
;
return
0
;
}
static
struct
super_block
*
ramfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
ramfs_fill_super
);
}
}
static
DECLARE_FSTYPE
(
ramfs_fs_type
,
"ramfs"
,
ramfs_read_super
,
FS_LITTER
);
static
struct
file_system_type
ramfs_fs_type
=
{
static
DECLARE_FSTYPE
(
rootfs_fs_type
,
"rootfs"
,
ramfs_read_super
,
FS_NOMOUNT
|
FS_LITTER
);
name:
"ramfs"
,
get_sb:
ramfs_get_sb
,
fs_flags:
FS_LITTER
,
};
static
struct
file_system_type
rootfs_fs_type
=
{
name:
"rootfs"
,
get_sb:
ramfs_get_sb
,
fs_flags:
FS_NOMOUNT
|
FS_LITTER
,
};
static
int
__init
init_ramfs_fs
(
void
)
static
int
__init
init_ramfs_fs
(
void
)
{
{
...
...
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