[PATCH 2/2] staging/erofs: Balanced braces around a few conditional statements.

Caitlyn Finn caitlynannefinn at gmail.com
Wed Aug 21 10:55:22 AEST 2019


Gao,

Thanks very much for your help and the prompt reply! Sorry for my mistake,
I will resolve and re-submit when I have an appropriate patch series.

Caitlyn Finn

On Tue, Aug 20, 2019 at 8:40 PM Gao Xiang <hsiangkao at aol.com> wrote:

> On Tue, Aug 20, 2019 at 08:18:20PM -0400, Caitlyn wrote:
> > Balanced braces to fix some checkpath warnings in inode.c and
> > unzip_vle.c
> >
> > Signed-off-by: Caitlyn <caitlynannefinn at gmail.com>
> > ---
> >  drivers/staging/erofs/inode.c     |  4 ++--
> >  drivers/staging/erofs/unzip_vle.c | 12 ++++++------
> >  2 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/staging/erofs/inode.c
> b/drivers/staging/erofs/inode.c
> > index 4c3d8bf..8de6fcd 100644
> > --- a/drivers/staging/erofs/inode.c
> > +++ b/drivers/staging/erofs/inode.c
> > @@ -278,9 +278,9 @@ struct inode *erofs_iget(struct super_block *sb,
> >               vi->nid = nid;
> >
> >               err = fill_inode(inode, isdir);
> > -             if (likely(!err))
> > +             if (likely(!err)) {
> >                       unlock_new_inode(inode);
>
> The only valid place is here.
>
> Thanks,
> Gao Xiang
>
> > -             else {
> > +             } else {
> >                       iget_failed(inode);
> >                       inode = ERR_PTR(err);
> >               }
> > diff --git a/drivers/staging/erofs/unzip_vle.c
> b/drivers/staging/erofs/unzip_vle.c
> > index f0dab81..f431614 100644
> > --- a/drivers/staging/erofs/unzip_vle.c
> > +++ b/drivers/staging/erofs/unzip_vle.c
> > @@ -915,21 +915,21 @@ static int z_erofs_vle_unzip(struct super_block
> *sb,
> >       mutex_lock(&work->lock);
> >       nr_pages = work->nr_pages;
> >
> > -     if (likely(nr_pages <= Z_EROFS_VLE_VMAP_ONSTACK_PAGES))
> > +     if (likely(nr_pages <= Z_EROFS_VLE_VMAP_ONSTACK_PAGES)) {
> >               pages = pages_onstack;
> > -     else if (nr_pages <= Z_EROFS_VLE_VMAP_GLOBAL_PAGES &&
> > -              mutex_trylock(&z_pagemap_global_lock))
> > +     } else if (nr_pages <= Z_EROFS_VLE_VMAP_GLOBAL_PAGES &&
> > +              mutex_trylock(&z_pagemap_global_lock)) {
> >               pages = z_pagemap_global;
> > -     else {
> > +     } else {
> >  repeat:
> >               pages = kvmalloc_array(nr_pages, sizeof(struct page *),
> >                                      GFP_KERNEL);
> >
> >               /* fallback to global pagemap for the lowmem scenario */
> >               if (unlikely(!pages)) {
> > -                     if (nr_pages > Z_EROFS_VLE_VMAP_GLOBAL_PAGES)
> > +                     if (nr_pages > Z_EROFS_VLE_VMAP_GLOBAL_PAGES) {
> >                               goto repeat;
> > -                     else {
> > +                     } else {
> >                               mutex_lock(&z_pagemap_global_lock);
> >                               pages = z_pagemap_global;
> >                       }
> > --
> > 2.7.4
> >
> > _______________________________________________
> > devel mailing list
> > devel at linuxdriverproject.org
> > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linux-erofs/attachments/20190820/2aa89951/attachment.htm>


More information about the Linux-erofs mailing list