mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-10-04 08:02:24 +00:00
isofs check for NULL ->i_op in root directory is dead code
for one thing it never happens, for another we check that inode is a directory right after that place anyway (and we'd already checked that reading it from disk has not failed). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c765d47903
commit
261964c60f
@ -855,10 +855,6 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
|
|||||||
}
|
}
|
||||||
sbi->s_joliet_level = joliet_level;
|
sbi->s_joliet_level = joliet_level;
|
||||||
|
|
||||||
/* check the root inode */
|
|
||||||
if (!inode->i_op)
|
|
||||||
goto out_bad_root;
|
|
||||||
|
|
||||||
/* Make sure the root inode is a directory */
|
/* Make sure the root inode is a directory */
|
||||||
if (!S_ISDIR(inode->i_mode)) {
|
if (!S_ISDIR(inode->i_mode)) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
@ -886,8 +882,6 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
|
|||||||
/*
|
/*
|
||||||
* Display error messages and free resources.
|
* Display error messages and free resources.
|
||||||
*/
|
*/
|
||||||
out_bad_root:
|
|
||||||
printk(KERN_WARNING "%s: root inode not initialized\n", __func__);
|
|
||||||
out_iput:
|
out_iput:
|
||||||
iput(inode);
|
iput(inode);
|
||||||
goto out_no_inode;
|
goto out_no_inode;
|
||||||
|
Loading…
Reference in New Issue
Block a user