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
Kirill Smelkov
linux
Commits
979cd1d1
Commit
979cd1d1
authored
Sep 22, 2003
by
Alexander Viro
Committed by
Linus Torvalds
Sep 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] prepare for 32-bit dev_t: jffs2 cleanups
Minor cleanup of jffs2 fill_super.
parent
9cc36375
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
fs/jffs2/super.c
fs/jffs2/super.c
+17
-13
No files found.
fs/jffs2/super.c
View file @
979cd1d1
...
...
@@ -173,7 +173,6 @@ static struct super_block *jffs2_get_sb(struct file_system_type *fs_type,
int
err
;
struct
nameidata
nd
;
int
mtdnr
;
dev_t
dev
;
if
(
!
dev_name
)
return
ERR_PTR
(
-
EINVAL
);
...
...
@@ -227,26 +226,31 @@ static struct super_block *jffs2_get_sb(struct file_system_type *fs_type,
if
(
err
)
return
ERR_PTR
(
err
);
if
(
!
S_ISBLK
(
nd
.
dentry
->
d_inode
->
i_mode
))
{
path_release
(
&
nd
);
return
ERR_PTR
(
-
EINVAL
);
}
err
=
-
EINVAL
;
if
(
!
S_ISBLK
(
nd
.
dentry
->
d_inode
->
i_mode
))
goto
out
;
if
(
nd
.
mnt
->
mnt_flags
&
MNT_NODEV
)
{
path_release
(
&
nd
)
;
return
ERR_PTR
(
-
EACCES
)
;
err
=
-
EACCES
;
goto
out
;
}
dev
=
nd
.
dentry
->
d_inode
->
i_rdev
;
path_release
(
&
nd
);
if
(
MAJOR
(
dev
)
!=
MTD_BLOCK_MAJOR
)
{
if
(
imajor
(
nd
.
dentry
->
d_inode
)
!=
MTD_BLOCK_MAJOR
)
{
if
(
!
(
flags
&
MS_VERBOSE
))
/* Yes I mean this. Strangely */
printk
(
KERN_NOTICE
"Attempt to mount non-MTD device
\"
%s
\"
as JFFS2
\n
"
,
dev_name
);
return
ERR_PTR
(
-
EINVAL
)
;
goto
out
;
}
return
jffs2_get_sb_mtdnr
(
fs_type
,
flags
,
dev_name
,
data
,
MINOR
(
dev
));
mtdnr
=
iminor
(
nd
.
dentry
->
d_inode
);
path_release
(
&
nd
);
return
jffs2_get_sb_mtdnr
(
fs_type
,
flags
,
dev_name
,
data
,
mtdnr
);
out:
path_release
(
&
nd
);
return
ERR_PTR
(
err
);
}
...
...
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