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
e58ca020
Commit
e58ca020
authored
Apr 01, 2008
by
Yan
Committed by
Chris Mason
Sep 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix btrfs_fill_super to return -EINVAL when no FS found
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
63b10fc4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-2
fs/btrfs/super.c
fs/btrfs/super.c
+2
-2
fs/btrfs/volumes.c
fs/btrfs/volumes.c
+1
-1
No files found.
fs/btrfs/disk-io.c
View file @
e58ca020
...
...
@@ -728,9 +728,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
struct
btrfs_root
*
dev_root
=
kmalloc
(
sizeof
(
struct
btrfs_root
),
GFP_NOFS
);
int
ret
;
int
err
=
-
EI
O
;
int
err
=
-
EI
NVAL
;
struct
btrfs_super_block
*
disk_super
;
if
(
!
extent_root
||
!
tree_root
||
!
fs_info
)
{
err
=
-
ENOMEM
;
goto
fail
;
...
...
fs/btrfs/super.c
View file @
e58ca020
...
...
@@ -236,9 +236,9 @@ static int btrfs_fill_super(struct super_block * sb,
tree_root
=
open_ctree
(
sb
,
fs_devices
);
if
(
!
tree_root
||
IS_ERR
(
tree_root
))
{
if
(
IS_ERR
(
tree_root
))
{
printk
(
"btrfs: open_ctree failed
\n
"
);
return
-
EIO
;
return
PTR_ERR
(
tree_root
)
;
}
sb
->
s_fs_info
=
tree_root
;
disk_super
=
&
tree_root
->
fs_info
->
super_copy
;
...
...
fs/btrfs/volumes.c
View file @
e58ca020
...
...
@@ -237,7 +237,7 @@ int btrfs_scan_one_device(const char *path, int flags, void *holder,
if
(
strncmp
((
char
*
)(
&
disk_super
->
magic
),
BTRFS_MAGIC
,
sizeof
(
disk_super
->
magic
)))
{
printk
(
"no btrfs found on %s
\n
"
,
path
);
ret
=
-
E
NOENT
;
ret
=
-
E
INVAL
;
goto
error_brelse
;
}
devid
=
le64_to_cpu
(
disk_super
->
dev_item
.
devid
);
...
...
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