From: Vojtech Pavlik <vojtech@suse.com>
To: Michael Lyle <mlyle@lyle.org>
Cc: linux-bcache@vger.kernel.org
Subject: Re: [PATCH v2] bcache: check return value of register_shrinker
Date: Fri, 24 Nov 2017 23:35:18 +0100 [thread overview]
Message-ID: <20171124223518.GA2892@suse.com> (raw)
In-Reply-To: <a1831d01-b327-1e0b-b802-38892931e56e@lyle.org>
On Fri, Nov 24, 2017 at 02:24:42PM -0800, Michael Lyle wrote:
> Just a note to everyone-- a quick Reviewed-by: would be appreciated from
> someone here on the bcache list because I'm hoping to get this sent off
> with a couple other things to Jens soon. -mpl
>
> On 11/24/2017 02:02 PM, Michael Lyle wrote:
> > register_shrinker is now __must_check, so check it to kill a warning.
> > Caller of bch_btree_cache_alloc in super.c appropriately checks return
> > value so this is fully plumbed through.
> >
> > This V2 fixes checkpatch warnings and improves the commit description,
> > as I was too hasty getting the previous version out.
> >
> > Signed-off-by: Michael Lyle <mlyle@lyle.org>
> > ---
> > drivers/md/bcache/btree.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
> > index 11c5503d31dc..81e8dc3dbe5e 100644
> > --- a/drivers/md/bcache/btree.c
> > +++ b/drivers/md/bcache/btree.c
> > @@ -807,7 +807,10 @@ int bch_btree_cache_alloc(struct cache_set *c)
> > c->shrink.scan_objects = bch_mca_scan;
> > c->shrink.seeks = 4;
> > c->shrink.batch = c->btree_pages * 2;
> > - register_shrinker(&c->shrink);
> > +
> > + if (register_shrinker(&c->shrink))
> > + pr_warn("bcache: %s: could not register shrinker",
> > + __func__);
> >
> > return 0;
> > }
Reviewed-by: Vojtech Pavlik <vojtech@suse.com>
--
Vojtech Pavlik
Director SuSE Labs
prev parent reply other threads:[~2017-11-24 23:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 20:18 [PATCH] bcache: check return value of register_shrinker Michael Lyle
2017-11-24 22:02 ` [PATCH v2] " Michael Lyle
2017-11-24 22:24 ` Michael Lyle
2017-11-24 22:35 ` Vojtech Pavlik [this message]
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=20171124223518.GA2892@suse.com \
--to=vojtech@suse.com \
--cc=linux-bcache@vger.kernel.org \
--cc=mlyle@lyle.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.