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
70861a8b
Commit
70861a8b
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] (3/6) more ->get_sb()
coda.
parent
9b7f1d7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
fs/coda/inode.c
fs/coda/inode.c
+17
-10
No files found.
fs/coda/inode.c
View file @
70861a8b
...
...
@@ -33,7 +33,6 @@
#include <linux/coda_cache.h>
/* VFS super_block ops */
static
struct
super_block
*
coda_read_super
(
struct
super_block
*
,
void
*
,
int
);
static
void
coda_read_inode
(
struct
inode
*
);
static
void
coda_clear_inode
(
struct
inode
*
);
static
void
coda_put_super
(
struct
super_block
*
);
...
...
@@ -140,8 +139,7 @@ static int get_device_index(struct coda_mount_data *data)
return
idx
;
}
static
struct
super_block
*
coda_read_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
static
int
coda_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
inode
*
root
=
0
;
struct
coda_sb_info
*
sbi
=
NULL
;
...
...
@@ -161,17 +159,17 @@ static struct super_block * coda_read_super(struct super_block *sb,
vc
=
&
coda_comms
[
idx
];
if
(
!
vc
->
vc_inuse
)
{
printk
(
"coda_read_super: No pseudo device
\n
"
);
return
NUL
L
;
return
-
EINVA
L
;
}
if
(
vc
->
vc_sb
)
{
printk
(
"coda_read_super: Device already mounted
\n
"
);
return
NULL
;
return
-
EBUSY
;
}
sbi
=
kmalloc
(
sizeof
(
struct
coda_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
{
return
NULL
;
return
-
ENOMEM
;
}
vc
->
vc_sb
=
sb
;
...
...
@@ -192,7 +190,7 @@ static struct super_block * coda_read_super(struct super_block *sb,
printk
(
"coda_read_super: coda_get_rootfid failed with %d
\n
"
,
error
);
goto
error
;
}
}
printk
(
"coda_read_super: rootfid is %s
\n
"
,
coda_f2s
(
&
fid
));
/* make root inode */
...
...
@@ -205,7 +203,7 @@ static struct super_block * coda_read_super(struct super_block *sb,
printk
(
"coda_read_super: rootinode is %ld dev %x
\n
"
,
root
->
i_ino
,
kdev_val
(
root
->
i_dev
));
sb
->
s_root
=
d_alloc_root
(
root
);
return
sb
;
return
0
;
error:
if
(
sbi
)
{
...
...
@@ -216,7 +214,7 @@ static struct super_block * coda_read_super(struct super_block *sb,
if
(
root
)
iput
(
root
);
return
NUL
L
;
return
-
EINVA
L
;
}
static
void
coda_put_super
(
struct
super_block
*
sb
)
...
...
@@ -313,5 +311,14 @@ static int coda_statfs(struct super_block *sb, struct statfs *buf)
/* init_coda: used by filesystems.c to register coda */
DECLARE_FSTYPE
(
coda_fs_type
,
"coda"
,
coda_read_super
,
0
);
static
struct
super_block
*
coda_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
coda_fill_super
);
}
struct
file_system_type
coda_fs_type
=
{
owner:
THIS_MODULE
,
name:
"coda"
,
get_sb:
coda_get_sb
,
};
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