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
a8723f35
Commit
a8723f35
authored
Mar 12, 2002
by
Brian Gerst
Committed by
Linus Torvalds
Mar 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] struct super_block cleanup - efs
Separates efs_sb_info from struct super_block.
parent
f8534f75
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
fs/efs/super.c
fs/efs/super.c
+14
-1
include/linux/efs_fs.h
include/linux/efs_fs.h
+6
-1
include/linux/fs.h
include/linux/fs.h
+0
-2
No files found.
fs/efs/super.c
View file @
a8723f35
...
...
@@ -70,10 +70,17 @@ static void destroy_inodecache(void)
printk
(
KERN_INFO
"efs_inode_cache: not all structures were freed
\n
"
);
}
void
efs_put_super
(
struct
super_block
*
s
)
{
kfree
(
s
->
u
.
generic_sbp
);
s
->
u
.
generic_sbp
=
NULL
;
}
static
struct
super_operations
efs_superblock_operations
=
{
alloc_inode:
efs_alloc_inode
,
destroy_inode:
efs_destroy_inode
,
read_inode:
efs_read_inode
,
put_super:
efs_put_super
,
statfs:
efs_statfs
,
};
...
...
@@ -205,7 +212,11 @@ int efs_fill_super(struct super_block *s, void *d, int silent)
struct
efs_sb_info
*
sb
;
struct
buffer_head
*
bh
;
sb
=
SUPER_INFO
(
s
);
sb
=
kmalloc
(
sizeof
(
struct
efs_sb_info
),
GFP_KERNEL
);
if
(
!
sb
)
return
-
ENOMEM
;
s
->
u
.
generic_sbp
=
sb
;
memset
(
sb
,
0
,
sizeof
(
struct
efs_sb_info
));
s
->
s_magic
=
EFS_SUPER_MAGIC
;
sb_set_blocksize
(
s
,
EFS_BLOCKSIZE
);
...
...
@@ -263,6 +274,8 @@ int efs_fill_super(struct super_block *s, void *d, int silent)
out_no_fs_ul:
out_no_fs:
s
->
u
.
generic_sbp
=
NULL
;
kfree
(
sb
);
return
-
EINVAL
;
}
...
...
include/linux/efs_fs.h
View file @
a8723f35
...
...
@@ -29,6 +29,7 @@ static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@aes
#include <linux/fs.h>
#include <linux/efs_fs_i.h>
#include <linux/efs_fs_sb.h>
#include <linux/efs_dir.h>
#ifndef MIN
...
...
@@ -42,7 +43,11 @@ static inline struct efs_inode_info *INODE_INFO(struct inode *inode)
{
return
list_entry
(
inode
,
struct
efs_inode_info
,
vfs_inode
);
}
#define SUPER_INFO(s) &((s)->u.efs_sb)
static
inline
struct
efs_sb_info
*
SUPER_INFO
(
struct
super_block
*
sb
)
{
return
sb
->
u
.
generic_sbp
;
}
extern
struct
inode_operations
efs_dir_inode_operations
;
extern
struct
file_operations
efs_dir_operations
;
...
...
include/linux/fs.h
View file @
a8723f35
...
...
@@ -653,7 +653,6 @@ struct quota_mount_options
#include <linux/sysv_fs_sb.h>
#include <linux/affs_fs_sb.h>
#include <linux/ufs_fs_sb.h>
#include <linux/efs_fs_sb.h>
#include <linux/romfs_fs_sb.h>
#include <linux/smb_fs_sb.h>
#include <linux/hfs_fs_sb.h>
...
...
@@ -706,7 +705,6 @@ struct super_block {
struct
sysv_sb_info
sysv_sb
;
struct
affs_sb_info
affs_sb
;
struct
ufs_sb_info
ufs_sb
;
struct
efs_sb_info
efs_sb
;
struct
shmem_sb_info
shmem_sb
;
struct
romfs_sb_info
romfs_sb
;
struct
smb_sb_info
smbfs_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