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
ca85c078
Commit
ca85c078
authored
Feb 12, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minixfs: switch to d_make_root()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
68acb8e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
fs/minix/inode.c
fs/minix/inode.c
+12
-16
No files found.
fs/minix/inode.c
View file @
ca85c078
...
...
@@ -254,14 +254,6 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
minix_set_bit
(
0
,
sbi
->
s_imap
[
0
]
->
b_data
);
minix_set_bit
(
0
,
sbi
->
s_zmap
[
0
]
->
b_data
);
/* set up enough so that it can read an inode */
s
->
s_op
=
&
minix_sops
;
root_inode
=
minix_iget
(
s
,
MINIX_ROOT_INO
);
if
(
IS_ERR
(
root_inode
))
{
ret
=
PTR_ERR
(
root_inode
);
goto
out_no_root
;
}
/* Apparently minix can create filesystems that allocate more blocks for
* the bitmaps than needed. We simply ignore that, but verify it didn't
* create one with not enough blocks and bail out if so.
...
...
@@ -270,7 +262,7 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
if
(
sbi
->
s_imap_blocks
<
block
)
{
printk
(
"MINIX-fs: file system does not have enough "
"imap blocks allocated. Refusing to mount
\n
"
);
goto
out_
iput
;
goto
out_
no_bitmap
;
}
block
=
minix_blocks_needed
(
...
...
@@ -279,13 +271,21 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
if
(
sbi
->
s_zmap_blocks
<
block
)
{
printk
(
"MINIX-fs: file system does not have enough "
"zmap blocks allocated. Refusing to mount.
\n
"
);
goto
out_iput
;
goto
out_no_bitmap
;
}
/* set up enough so that it can read an inode */
s
->
s_op
=
&
minix_sops
;
root_inode
=
minix_iget
(
s
,
MINIX_ROOT_INO
);
if
(
IS_ERR
(
root_inode
))
{
ret
=
PTR_ERR
(
root_inode
);
goto
out_no_root
;
}
ret
=
-
ENOMEM
;
s
->
s_root
=
d_
alloc
_root
(
root_inode
);
s
->
s_root
=
d_
make
_root
(
root_inode
);
if
(
!
s
->
s_root
)
goto
out_
ipu
t
;
goto
out_
no_roo
t
;
if
(
!
(
s
->
s_flags
&
MS_RDONLY
))
{
if
(
sbi
->
s_version
!=
MINIX_V3
)
/* s_state is now out from V3 sb */
...
...
@@ -301,10 +301,6 @@ static int minix_fill_super(struct super_block *s, void *data, int silent)
return
0
;
out_iput:
iput
(
root_inode
);
goto
out_freemap
;
out_no_root:
if
(
!
silent
)
printk
(
"MINIX-fs: get root inode failed
\n
"
);
...
...
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