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
93f7c8dc
Commit
93f7c8dc
authored
Apr 03, 2002
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sysvfs use sb->u.generic_sbp.
parent
d8f94035
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
18 deletions
+34
-18
fs/sysv/inode.c
fs/sysv/inode.c
+2
-0
fs/sysv/super.c
fs/sysv/super.c
+31
-15
include/linux/fs.h
include/linux/fs.h
+0
-2
include/linux/sysv_fs.h
include/linux/sysv_fs.h
+1
-1
No files found.
fs/sysv/inode.c
View file @
93f7c8dc
...
...
@@ -69,6 +69,8 @@ static void sysv_put_super(struct super_block *sb)
brelse
(
sbi
->
s_bh1
);
if
(
sbi
->
s_bh1
!=
sbi
->
s_bh2
)
brelse
(
sbi
->
s_bh2
);
kfree
(
sbi
);
}
static
int
sysv_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
buf
)
...
...
fs/sysv/super.c
View file @
93f7c8dc
...
...
@@ -25,6 +25,7 @@
#include <linux/fs.h>
#include <linux/sysv_fs.h>
#include <linux/init.h>
#include <linux/slab.h>
/*
* The following functions try to recognize specific filesystems.
...
...
@@ -344,26 +345,32 @@ static int complete_read_super(struct super_block *sb, int silent, int size)
static
int
sysv_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
sysv_sb_info
*
sbi
=
SYSV_SB
(
sb
);
struct
buffer_head
*
bh1
;
struct
buffer_head
*
bh
=
NULL
;
struct
buffer_head
*
bh1
,
*
bh
=
NULL
;
struct
sysv_sb_info
*
sbi
;
unsigned
long
blocknr
;
int
size
=
0
;
int
i
;
int
size
=
0
,
i
;
if
(
1024
!=
sizeof
(
struct
xenix_super_block
))
panic
(
"Xenix FS: bad super-block size"
);
if
((
512
!=
sizeof
(
struct
sysv4_super_block
))
||
(
512
!=
sizeof
(
struct
sysv2_super_block
)))
panic
(
"SystemV FS: bad super-block size"
);
panic
(
"Xenix FS: bad superblock size"
);
if
(
512
!=
sizeof
(
struct
sysv4_super_block
))
panic
(
"SystemV FS: bad superblock size"
);
if
(
512
!=
sizeof
(
struct
sysv2_super_block
))
panic
(
"SystemV FS: bad superblock size"
);
if
(
500
!=
sizeof
(
struct
coh_super_block
))
panic
(
"Coherent FS: bad super
-
block size"
);
panic
(
"Coherent FS: bad superblock size"
);
if
(
64
!=
sizeof
(
struct
sysv_inode
))
panic
(
"sysv fs: bad i-node size"
);
sb_set_blocksize
(
sb
,
BLOCK_SIZE
);
panic
(
"sysv fs: bad inode size"
);
sbi
=
kmalloc
(
sizeof
(
struct
sysv_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
return
-
ENOMEM
;
memset
(
sbi
,
0
,
sizeof
(
struct
sysv_sb_info
));
sbi
->
s_sb
=
sb
;
sbi
->
s_block_base
=
0
;
sb
->
u
.
generic_sbp
=
sbi
;
sb_set_blocksize
(
sb
,
BLOCK_SIZE
);
for
(
i
=
0
;
i
<
sizeof
(
flavours
)
/
sizeof
(
flavours
[
0
])
&&
!
size
;
i
++
)
{
brelse
(
bh
);
...
...
@@ -409,6 +416,7 @@ static int sysv_fill_super(struct super_block *sb, void *data, int silent)
sb_set_blocksize
(
sb
,
BLOCK_SIZE
);
printk
(
"oldfs: cannot read superblock
\n
"
);
failed:
kfree
(
sbi
);
return
-
EINVAL
;
Eunknown:
...
...
@@ -427,7 +435,7 @@ static int sysv_fill_super(struct super_block *sb, void *data, int silent)
static
int
v7_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
sysv_sb_info
*
sbi
=
SYSV_SB
(
sb
)
;
struct
sysv_sb_info
*
sbi
;
struct
buffer_head
*
bh
,
*
bh2
=
NULL
;
struct
v7_super_block
*
v7sb
;
struct
sysv_inode
*
v7i
;
...
...
@@ -437,11 +445,18 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent)
if
(
64
!=
sizeof
(
struct
sysv_inode
))
panic
(
"sysv fs: bad i-node size"
);
sbi
=
kmalloc
(
sizeof
(
struct
sysv_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
return
-
ENOMEM
;
memset
(
sbi
,
0
,
sizeof
(
struct
sysv_sb_info
));
sbi
->
s_sb
=
sb
;
sbi
->
s_block_base
=
0
;
sbi
->
s_type
=
FSTYPE_V7
;
sbi
->
s_bytesex
=
BYTESEX_PDP
;
sb_set_blocksize
(
sb
,
512
);
sb
->
u
.
generic_sbp
=
sbi
;
sb_set_blocksize
(
sb
,
BLOCK_SIZE
);
if
((
bh
=
sb_bread
(
sb
,
1
))
==
NULL
)
{
if
(
!
silent
)
...
...
@@ -476,6 +491,7 @@ static int v7_fill_super(struct super_block *sb, void *data, int silent)
failed:
brelse
(
bh2
);
brelse
(
bh
);
kfree
(
sbi
);
return
-
EINVAL
;
}
...
...
include/linux/fs.h
View file @
93f7c8dc
...
...
@@ -647,7 +647,6 @@ struct quota_mount_options
#include <linux/ext3_fs_sb.h>
#include <linux/hpfs_fs_sb.h>
#include <linux/ntfs_fs_sb.h>
#include <linux/sysv_fs_sb.h>
#include <linux/ufs_fs_sb.h>
#include <linux/romfs_fs_sb.h>
#include <linux/adfs_fs_sb.h>
...
...
@@ -691,7 +690,6 @@ struct super_block {
struct
ext3_sb_info
ext3_sb
;
struct
hpfs_sb_info
hpfs_sb
;
struct
ntfs_sb_info
ntfs_sb
;
struct
sysv_sb_info
sysv_sb
;
struct
ufs_sb_info
ufs_sb
;
struct
romfs_sb_info
romfs_sb
;
struct
adfs_sb_info
adfs_sb
;
...
...
include/linux/sysv_fs.h
View file @
93f7c8dc
...
...
@@ -30,7 +30,7 @@ static inline struct sysv_inode_info *SYSV_I(struct inode *inode)
static
inline
struct
sysv_sb_info
*
SYSV_SB
(
struct
super_block
*
sb
)
{
return
&
sb
->
u
.
sysv_sb
;
return
sb
->
u
.
generic_sbp
;
}
...
...
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