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
6729d00a
Commit
6729d00a
authored
Mar 03, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Mar 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] d_alloc_root() fixes: befs
- inode leak if d_alloc_root() fails.
parent
aec225ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fs/befs/linuxvfs.c
fs/befs/linuxvfs.c
+4
-2
No files found.
fs/befs/linuxvfs.c
View file @
6729d00a
...
@@ -789,6 +789,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
...
@@ -789,6 +789,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
befs_sb_info
*
befs_sb
;
befs_sb_info
*
befs_sb
;
befs_super_block
*
disk_sb
;
befs_super_block
*
disk_sb
;
struct
inode
*
root
;
const
unsigned
long
sb_block
=
0
;
const
unsigned
long
sb_block
=
0
;
const
off_t
x86_sb_off
=
512
;
const
off_t
x86_sb_off
=
512
;
...
@@ -863,9 +864,10 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
...
@@ -863,9 +864,10 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
/* Set real blocksize of fs */
/* Set real blocksize of fs */
sb_set_blocksize
(
sb
,
(
ulong
)
befs_sb
->
block_size
);
sb_set_blocksize
(
sb
,
(
ulong
)
befs_sb
->
block_size
);
sb
->
s_op
=
(
struct
super_operations
*
)
&
befs_sops
;
sb
->
s_op
=
(
struct
super_operations
*
)
&
befs_sops
;
sb
->
s_root
=
root
=
iget
(
sb
,
iaddr2blockno
(
sb
,
&
(
befs_sb
->
root_dir
)));
d_alloc_root
(
iget
(
sb
,
iaddr2blockno
(
sb
,
&
(
befs_sb
->
root_dir
)))
);
sb
->
s_root
=
d_alloc_root
(
root
);
if
(
!
sb
->
s_root
)
{
if
(
!
sb
->
s_root
)
{
iput
(
root
);
befs_error
(
sb
,
"get root inode failed"
);
befs_error
(
sb
,
"get root inode failed"
);
goto
unaquire_priv_sbp
;
goto
unaquire_priv_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