mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] uml: hostfs failed mount handling
This cleans up the error handling and fixes a crash if a hostfs mount fails. Signed-off-by: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a0b8d32020
commit
51a141104a
1 changed files with 7 additions and 3 deletions
|
|
@ -991,13 +991,17 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
|
|||
goto out_put;
|
||||
|
||||
err = read_inode(root_inode);
|
||||
if(err)
|
||||
goto out_put;
|
||||
if(err){
|
||||
/* No iput in this case because the dput does that for us */
|
||||
dput(sb->s_root);
|
||||
sb->s_root = NULL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
||||
out_put:
|
||||
iput(root_inode);
|
||||
iput(root_inode);
|
||||
out_free:
|
||||
kfree(name);
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue