UPSTREAM: binderfs: fix error return code in binderfs_fill_super()

Fix to return a negative error code -ENOMEM from the new_inode() and
d_make_root() error handling cases instead of 0, as done elsewhere in
this function.

Fixes: 849d540ddf ("binderfs: implement "max" mount option")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 136497735
(cherry picked from commit 7e7ca7744a)
Change-Id: If9d120c4abdbc0d5528c85d2515a9d5e40addfdc
Signed-off-by: Hridya Valsaraju <hridya@google.com>
This commit is contained in:
Wei Yongjun
2019-01-16 10:42:59 +00:00
committed by Hridya Valsaraju
parent 2e2d87cd43
commit 01408afb08

View File

@@ -518,6 +518,7 @@ static int binderfs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_fs_info = info;
ret = -ENOMEM;
inode = new_inode(sb);
if (!inode)
goto err_without_dentry;