From: "Kani, Toshimitsu" <toshi.kani@hpe.com>
To: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime
Date: Sun, 2 Jul 2017 19:31:49 +0000 [thread overview]
Message-ID: <1499023372.2042.1.camel@hpe.com> (raw)
In-Reply-To: <149892424300.37698.9888818880178611728.stgit@dwillia2-desk3.amr.corp.intel.com>
On Sat, 2017-07-01 at 08:50 -0700, Dan Williams wrote:
> We need to hold a reference on the 'dirent' until we are sure there
> are no more notifications that will be sent. As noted in the new
> comments we take advantage of the fact that the references are taken
> and dropped under device_lock() and that nd_device_notify() holds
> device_lock() over new badblocks notifications. The notifications
> that happen when badblocks are cleared only occur while the device is
> active.
>
> Also take the opportunity to fix up the error messages to report the
> user visible effect of a sysfs_get_dirent() failure.
>
> Fixes: 975750a98c26 ("libnvdimm, pmem: Add sysfs notifications to
> badblocks")
> Cc: Toshi Kani <toshi.kani@hpe.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Toshi Kani <toshi.kani@hpe.com>
Thanks Dan!
-Toshi
prev parent reply other threads:[~2017-07-02 19:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-01 15:50 [PATCH] libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime Dan Williams
2017-07-02 19:31 ` Kani, Toshimitsu [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=1499023372.2042.1.camel@hpe.com \
--to=toshi.kani@hpe.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).