From: Zhao Heming <heming.zhao@suse.com>
To: linux-lvm@redhat.com
Cc: Zhao Heming <heming.zhao@suse.com>
Subject: [linux-lvm] [PATCH] Change dev->bcache_fd default value from 0 to -1
Date: Sun, 31 May 2020 16:46:34 +0800 [thread overview]
Message-ID: <1590914794-25072-1-git-send-email-heming.zhao@suse.com> (raw)
This fix can avoid bcache_fd will mistakenly open/close in later.
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
---
lib/device/dev-cache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index 6af559c..c3f7c49 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -65,6 +65,7 @@ static int _insert(const char *path, const struct stat *info,
static void _dev_init(struct device *dev)
{
dev->fd = -1;
+ dev->bcache_fd = -1;
dev->read_ahead = -1;
dev->ext.enabled = 0;
--
1.8.3.1
reply other threads:[~2020-05-31 8:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1590914794-25072-1-git-send-email-heming.zhao@suse.com \
--to=heming.zhao@suse.com \
--cc=linux-lvm@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 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).