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
08e7ca9b
Commit
08e7ca9b
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/9) more ->get_sb() stuff
More ->get_sb() patches: capifs
parent
e23defd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
30 deletions
+14
-30
drivers/isdn/avmb1/capifs.c
drivers/isdn/avmb1/capifs.c
+14
-30
No files found.
drivers/isdn/avmb1/capifs.c
View file @
08e7ca9b
...
@@ -281,17 +281,12 @@ static int capifs_parse_options(char *options, struct capifs_sb_info *sbi)
...
@@ -281,17 +281,12 @@ static int capifs_parse_options(char *options, struct capifs_sb_info *sbi)
return
0
;
return
0
;
}
}
struct
super_block
*
capifs_read_super
(
struct
super_block
*
s
,
void
*
data
,
static
int
capifs_fill_super
(
struct
super_block
*
s
,
void
*
data
,
int
silent
)
int
silent
)
{
{
struct
inode
*
root_inode
;
struct
inode
*
root_inode
;
struct
dentry
*
root
;
struct
dentry
*
root
;
struct
capifs_sb_info
*
sbi
;
struct
capifs_sb_info
*
sbi
;
/* Super block already completed? */
if
(
s
->
s_root
)
goto
out
;
sbi
=
(
struct
capifs_sb_info
*
)
kmalloc
(
sizeof
(
struct
capifs_sb_info
),
GFP_KERNEL
);
sbi
=
(
struct
capifs_sb_info
*
)
kmalloc
(
sizeof
(
struct
capifs_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
if
(
!
sbi
)
goto
fail
;
goto
fail
;
...
@@ -317,7 +312,6 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
...
@@ -317,7 +312,6 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
s
->
s_blocksize_bits
=
10
;
s
->
s_blocksize_bits
=
10
;
s
->
s_magic
=
CAPIFS_SUPER_MAGIC
;
s
->
s_magic
=
CAPIFS_SUPER_MAGIC
;
s
->
s_op
=
&
capifs_sops
;
s
->
s_op
=
&
capifs_sops
;
s
->
s_root
=
NULL
;
/*
/*
* Get the root inode and dentry, but defer checking for errors.
* Get the root inode and dentry, but defer checking for errors.
...
@@ -332,15 +326,6 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
...
@@ -332,15 +326,6 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
}
}
root
=
d_alloc_root
(
root_inode
);
root
=
d_alloc_root
(
root_inode
);
/*
* Check whether somebody else completed the super block.
*/
if
(
s
->
s_root
)
{
if
(
root
)
dput
(
root
);
else
iput
(
root_inode
);
goto
out
;
}
if
(
!
root
)
{
if
(
!
root
)
{
printk
(
"capifs: get root dentry failed
\n
"
);
printk
(
"capifs: get root dentry failed
\n
"
);
/*
/*
...
@@ -352,15 +337,6 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
...
@@ -352,15 +337,6 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
goto
fail
;
goto
fail
;
}
}
/*
* Check whether somebody else completed the super block.
*/
if
(
s
->
s_root
)
goto
out
;
/*
* Success! Install the root dentry now to indicate completion.
*/
s
->
s_root
=
root
;
s
->
s_root
=
root
;
sbi
->
next
=
mounts
;
sbi
->
next
=
mounts
;
...
@@ -368,11 +344,9 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
...
@@ -368,11 +344,9 @@ struct super_block *capifs_read_super(struct super_block *s, void *data,
SBI
(
sbi
->
next
)
->
back
=
&
(
sbi
->
next
);
SBI
(
sbi
->
next
)
->
back
=
&
(
sbi
->
next
);
sbi
->
back
=
&
mounts
;
sbi
->
back
=
&
mounts
;
mounts
=
s
;
mounts
=
s
;
return
0
;
out:
/* Success ... somebody else completed the super block for us. */
return
s
;
fail:
fail:
return
NUL
L
;
return
-
EINVA
L
;
}
}
static
int
capifs_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
buf
)
static
int
capifs_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
buf
)
...
@@ -400,7 +374,17 @@ static struct inode *capifs_new_inode(struct super_block *sb)
...
@@ -400,7 +374,17 @@ static struct inode *capifs_new_inode(struct super_block *sb)
return
inode
;
return
inode
;
}
}
static
DECLARE_FSTYPE
(
capifs_fs_type
,
"capifs"
,
capifs_read_super
,
0
);
static
struct
super_block
*
capifs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
capifs_fill_super
);
}
static
struct
file_system_type
capifs_fs_type
=
{
owner:
THIS_MODULE
,
name:
"capifs"
,
get_sb:
capifs_get_sb
,
};
void
capifs_new_ncci
(
char
type
,
unsigned
int
num
,
kdev_t
device
)
void
capifs_new_ncci
(
char
type
,
unsigned
int
num
,
kdev_t
device
)
{
{
...
...
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