From: weiping zhang <zhangweiping@didichuxing.com>
To: <axboe@kernel.dk>, Jan Kara <jack@suse.cz>
Cc: <axboe@kernel.dk>, <linux-block@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH v2 2/3] bdi: add error handle for bdi_debug_register
Date: Fri, 17 Nov 2017 23:06:04 +0800 [thread overview]
Message-ID: <20171117150604.GA21325@localhost.didichuxing.com> (raw)
In-Reply-To: <20171101134722.GB28572@quack2.suse.cz>
On Wed, Nov 01, 2017 at 02:47:22PM +0100, Jan Kara wrote:
> On Tue 31-10-17 18:38:24, weiping zhang wrote:
> > In order to make error handle more cleaner we call bdi_debug_register
> > before set state to WB_registered, that we can avoid call bdi_unregister
> > in release_bdi().
> >
> > Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
>
> Honza
>
> > ---
> > mm/backing-dev.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> > index b5f940ce0143..84b2dc76f140 100644
> > --- a/mm/backing-dev.c
> > +++ b/mm/backing-dev.c
> > @@ -882,10 +882,13 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args)
> > if (IS_ERR(dev))
> > return PTR_ERR(dev);
> >
> > + if (bdi_debug_register(bdi, dev_name(dev))) {
> > + device_destroy(bdi_class, dev->devt);
> > + return -ENOMEM;
> > + }
> > cgwb_bdi_register(bdi);
> > bdi->dev = dev;
> >
> > - bdi_debug_register(bdi, dev_name(dev));
> > set_bit(WB_registered, &bdi->wb.state);
> >
> > spin_lock_bh(&bdi_lock);
> > --
Hello Jens,
Could you please give some comments for this series cleanup.
--
Thanks
weiping
WARNING: multiple messages have this Message-ID (diff)
From: weiping zhang <zhangweiping@didichuxing.com>
To: axboe@kernel.dk, Jan Kara <jack@suse.cz>
Cc: linux-block@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2 2/3] bdi: add error handle for bdi_debug_register
Date: Fri, 17 Nov 2017 23:06:04 +0800 [thread overview]
Message-ID: <20171117150604.GA21325@localhost.didichuxing.com> (raw)
In-Reply-To: <20171101134722.GB28572@quack2.suse.cz>
On Wed, Nov 01, 2017 at 02:47:22PM +0100, Jan Kara wrote:
> On Tue 31-10-17 18:38:24, weiping zhang wrote:
> > In order to make error handle more cleaner we call bdi_debug_register
> > before set state to WB_registered, that we can avoid call bdi_unregister
> > in release_bdi().
> >
> > Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
>
> Looks good to me. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
>
> Honza
>
> > ---
> > mm/backing-dev.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> > index b5f940ce0143..84b2dc76f140 100644
> > --- a/mm/backing-dev.c
> > +++ b/mm/backing-dev.c
> > @@ -882,10 +882,13 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args)
> > if (IS_ERR(dev))
> > return PTR_ERR(dev);
> >
> > + if (bdi_debug_register(bdi, dev_name(dev))) {
> > + device_destroy(bdi_class, dev->devt);
> > + return -ENOMEM;
> > + }
> > cgwb_bdi_register(bdi);
> > bdi->dev = dev;
> >
> > - bdi_debug_register(bdi, dev_name(dev));
> > set_bit(WB_registered, &bdi->wb.state);
> >
> > spin_lock_bh(&bdi_lock);
> > --
Hello Jens,
Could you please give some comments for this series cleanup.
--
Thanks
weiping
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-11-17 15:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-31 10:37 [PATCH v2 0/3] add error handle for bdi debugfs register weiping zhang
2017-10-31 10:37 ` weiping zhang
2017-10-31 10:37 ` [PATCH v2 1/3] bdi: convert bdi_debug_register to int weiping zhang
2017-10-31 10:37 ` weiping zhang
2017-10-31 10:38 ` [PATCH v2 2/3] bdi: add error handle for bdi_debug_register weiping zhang
2017-10-31 10:38 ` weiping zhang
2017-11-01 13:47 ` Jan Kara
2017-11-01 13:47 ` Jan Kara
2017-11-17 15:06 ` weiping zhang [this message]
2017-11-17 15:06 ` weiping zhang
2017-11-17 16:34 ` Jens Axboe
2017-11-17 16:34 ` Jens Axboe
2017-10-31 10:38 ` [PATCH v2 3/3] block: add WARN_ON if bdi register fail weiping zhang
2017-10-31 10:38 ` weiping zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171117150604.GA21325@localhost.didichuxing.com \
--to=zhangweiping@didichuxing.com \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.