Re: [PATCH -next v2] binderfs: fix error return code in binderfs_fill_super()
On Wed, Jan 16, 2019 at 09:41:08AM +0100, Christian Brauner wrote: > On Wed, Jan 16, 2019 at 08:34:02AM +, Wei Yongjun wrote: > > 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: 3ad20fe393b3 ("binder: implement binderfs") > > This should be: > > Fixes: 849d540ddfcd ("binderfs: implement "max" mount option") > > If you have added that feel free to also add my Reviewed-by. Also, this does need to go into char-misc-linus and not -next so you can drop the -next prefix from the [PATCH ...] prefix. :) Greg will do the right thing in any case but it's just clearer if you don't add it. :) Thanks! Christian
Re: [PATCH -next v2] binderfs: fix error return code in binderfs_fill_super()
On Wed, Jan 16, 2019 at 08:34:02AM +, Wei Yongjun wrote: > 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: 3ad20fe393b3 ("binder: implement binderfs") This should be: Fixes: 849d540ddfcd ("binderfs: implement "max" mount option") If you have added that feel free to also add my Reviewed-by. Thanks! Christian > Signed-off-by: Wei Yongjun > --- > v1 -> v2: move 'ret = -ENOMEM' out of if > --- > drivers/android/binderfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c > index 9518e2e..e4ff4c3 100644 > --- a/drivers/android/binderfs.c > +++ b/drivers/android/binderfs.c > @@ -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; > > >
[PATCH -next v2] 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: 3ad20fe393b3 ("binder: implement binderfs") Signed-off-by: Wei Yongjun --- v1 -> v2: move 'ret = -ENOMEM' out of if --- drivers/android/binderfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c index 9518e2e..e4ff4c3 100644 --- a/drivers/android/binderfs.c +++ b/drivers/android/binderfs.c @@ -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;