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
e368ea0b
Commit
e368ea0b
authored
Mar 17, 2002
by
Brian Gerst
Committed by
Linus Torvalds
Mar 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] struct super_block cleanup - hfs
Seperates hfs_sb_info from struct super_block.
parent
4758c319
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
fs/hfs/super.c
fs/hfs/super.c
+14
-2
include/linux/fs.h
include/linux/fs.h
+0
-2
include/linux/hfs_fs.h
include/linux/hfs_fs.h
+6
-1
No files found.
fs/hfs/super.c
View file @
e368ea0b
...
...
@@ -178,6 +178,9 @@ static void hfs_put_super(struct super_block *sb)
/* restore default blocksize for the device */
set_blocksize
(
sb
->
s_dev
,
BLOCK_SIZE
);
kfree
(
sb
->
u
.
generic_sbp
);
sb
->
u
.
generic_sbp
=
NULL
;
}
/*
...
...
@@ -443,6 +446,7 @@ static int parse_options(char *options, struct hfs_sb_info *hsb, int *part)
*/
int
hfs_fill_super
(
struct
super_block
*
s
,
void
*
data
,
int
silent
)
{
struct
hfs_sb_info
*
sbi
;
struct
hfs_mdb
*
mdb
;
struct
hfs_cat_key
key
;
kdev_t
dev
=
s
->
s_dev
;
...
...
@@ -450,7 +454,13 @@ int hfs_fill_super(struct super_block *s, void *data, int silent)
struct
inode
*
root_inode
;
int
part
;
if
(
!
parse_options
((
char
*
)
data
,
HFS_SB
(
s
),
&
part
))
{
sbi
=
kmalloc
(
sizeof
(
struct
hfs_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
return
-
ENOMEM
;
s
->
u
.
generic_sbp
=
sbi
;
memset
(
sbi
,
0
,
sizeof
(
struct
hfs_sb_info
));
if
(
!
parse_options
((
char
*
)
data
,
sbi
,
&
part
))
{
hfs_warn
(
"hfs_fs: unable to parse mount options.
\n
"
);
goto
bail3
;
}
...
...
@@ -485,7 +495,7 @@ int hfs_fill_super(struct super_block *s, void *data, int silent)
goto
bail2
;
}
HFS_SB
(
s
)
->
s_mdb
=
mdb
;
sbi
->
s_mdb
=
mdb
;
if
(
HFS_ITYPE
(
mdb
->
next_id
)
!=
0
)
{
hfs_warn
(
"hfs_fs: too many files.
\n
"
);
goto
bail1
;
...
...
@@ -522,6 +532,8 @@ int hfs_fill_super(struct super_block *s, void *data, int silent)
bail2:
set_blocksize
(
dev
,
BLOCK_SIZE
);
bail3:
kfree
(
sbi
);
sb
->
u
.
generic_sbp
=
NULL
;
return
-
EINVAL
;
}
...
...
include/linux/fs.h
View file @
e368ea0b
...
...
@@ -651,7 +651,6 @@ struct quota_mount_options
#include <linux/affs_fs_sb.h>
#include <linux/ufs_fs_sb.h>
#include <linux/romfs_fs_sb.h>
#include <linux/hfs_fs_sb.h>
#include <linux/adfs_fs_sb.h>
#include <linux/reiserfs_fs_sb.h>
#include <linux/bfs_fs_sb.h>
...
...
@@ -697,7 +696,6 @@ struct super_block {
struct
affs_sb_info
affs_sb
;
struct
ufs_sb_info
ufs_sb
;
struct
romfs_sb_info
romfs_sb
;
struct
hfs_sb_info
hfs_sb
;
struct
adfs_sb_info
adfs_sb
;
struct
reiserfs_sb_info
reiserfs_sb
;
struct
bfs_sb_info
bfs_sb
;
...
...
include/linux/hfs_fs.h
View file @
e368ea0b
...
...
@@ -318,12 +318,17 @@ extern int hfs_mac2triv(char *, const struct hfs_name *);
extern
void
hfs_tolower
(
unsigned
char
*
,
int
);
#include <linux/hfs_fs_i.h>
#include <linux/hfs_fs_sb.h>
static
inline
struct
hfs_inode_info
*
HFS_I
(
struct
inode
*
inode
)
{
return
list_entry
(
inode
,
struct
hfs_inode_info
,
vfs_inode
);
}
#define HFS_SB(X) (&((X)->u.hfs_sb))
static
inline
struct
hfs_sb_info
*
HFS_SB
(
struct
super_block
*
sb
)
{
return
sb
->
u
.
generic_sbp
;
}
static
inline
void
hfs_nameout
(
struct
inode
*
dir
,
struct
hfs_name
*
out
,
const
char
*
in
,
int
len
)
{
...
...
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