All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - scan: handle request to scan missing dev
Date: Mon, 23 Apr 2018 09:50:01 -0400	[thread overview]
Message-ID: <201804231350.w3NDo1uI031785@lists01.pubmisc.prod.ext.phx2.redhat.com> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e4f478d86d6545f6cced7a8ba3bc0b79dccb7b6e
Commit:        e4f478d86d6545f6cced7a8ba3bc0b79dccb7b6e
Parent:        89f54a5094981c827ca557cb1381e5f1a028912c
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Tue Feb 13 16:17:02 2018 -0600
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Fri Apr 20 11:22:46 2018 -0500

scan: handle request to scan missing dev

---
 lib/label/label.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/label/label.c b/lib/label/label.c
index 1268498..19beecf 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -257,6 +257,8 @@ struct bcache *scan_bcache;
 
 static bool _in_bcache(struct device *dev)
 {
+	if (!dev)
+		return NULL;
 	return (dev->flags & DEV_IN_BCACHE) ? true : false;
 }
 
@@ -402,6 +404,9 @@ static int _scan_dev_open(struct device *dev)
 	int flags = 0;
 	int fd;
 
+	if (!dev)
+		return 0;
+
 	if (dev->flags & DEV_IN_BCACHE) {
 		log_error("scan_dev_open %s DEV_IN_BCACHE already set", dev_name(dev));
 		dev->flags &= ~DEV_IN_BCACHE;



             reply	other threads:[~2018-04-23 13:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 13:50 David Teigland [this message]
2018-04-23 13:54 master - scan: handle request to scan missing dev David Teigland

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=201804231350.w3NDo1uI031785@lists01.pubmisc.prod.ext.phx2.redhat.com \
    --to=teigland@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /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.