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
1b23ec30
Commit
1b23ec30
authored
Mar 11, 2002
by
Brian Gerst
Committed by
Linus Torvalds
Mar 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] struct superblock cleanup - minixfs
Switch to using kmalloc to allocate the minix superblock structure.
parent
ddd7dce9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
fs/minix/inode.c
fs/minix/inode.c
+10
-1
include/linux/fs.h
include/linux/fs.h
+0
-2
include/linux/minix_fs.h
include/linux/minix_fs.h
+1
-1
No files found.
fs/minix/inode.c
View file @
1b23ec30
...
...
@@ -70,6 +70,8 @@ static void minix_put_super(struct super_block *sb)
brelse
(
sbi
->
s_zmap
[
i
]);
brelse
(
sbi
->
s_sbh
);
kfree
(
sbi
->
s_imap
);
sb
->
u
.
generic_sbp
=
NULL
;
kfree
(
sbi
);
return
;
}
...
...
@@ -170,7 +172,12 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
struct
minix_super_block
*
ms
;
int
i
,
block
;
struct
inode
*
root_inode
;
struct
minix_sb_info
*
sbi
=
minix_sb
(
s
);
struct
minix_sb_info
*
sbi
;
sbi
=
kmalloc
(
sizeof
(
struct
minix_sb_info
),
GFP_KERNEL
);
if
(
!
sbi
)
return
-
ENOMEM
;
s
->
u
.
generic_sbp
=
sbi
;
/* N.B. These should be compile-time tests.
Unfortunately that is impossible. */
...
...
@@ -313,6 +320,8 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
out_bad_sb:
printk
(
"MINIX-fs: unable to read superblock
\n
"
);
out:
s
->
u
.
generic_sbp
=
NULL
;
kfree
(
sbi
);
return
-
EINVAL
;
}
...
...
include/linux/fs.h
View file @
1b23ec30
...
...
@@ -649,7 +649,6 @@ struct quota_mount_options
#define MNT_FORCE 0x00000001
/* Attempt to forcibily umount */
#define MNT_DETACH 0x00000002
/* Just detach from the tree */
#include <linux/minix_fs_sb.h>
#include <linux/ext2_fs_sb.h>
#include <linux/ext3_fs_sb.h>
#include <linux/hpfs_fs_sb.h>
...
...
@@ -707,7 +706,6 @@ struct super_block {
char
s_id
[
32
];
/* Informational name */
union
{
struct
minix_sb_info
minix_sb
;
struct
ext2_sb_info
ext2_sb
;
struct
ext3_sb_info
ext3_sb
;
struct
hpfs_sb_info
hpfs_sb
;
...
...
include/linux/minix_fs.h
View file @
1b23ec30
...
...
@@ -134,7 +134,7 @@ extern struct dentry_operations minix_dentry_operations;
static
inline
struct
minix_sb_info
*
minix_sb
(
struct
super_block
*
sb
)
{
return
&
sb
->
u
.
minix_sb
;
return
sb
->
u
.
generic_sbp
;
}
static
inline
struct
minix_inode_info
*
minix_i
(
struct
inode
*
inode
)
...
...
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