All of lore.kernel.org
 help / color / mirror / Atom feed
* master - Change dev->bcache_fd default value from 0 to -1
@ 2020-06-01 21:08 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2020-06-01 21:08 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b59127a8386a407407a0361b9bcad028ce31a733
Commit:        b59127a8386a407407a0361b9bcad028ce31a733
Parent:        d14a8040d4a2b264130cdb730cead935b0bf19f0
Author:        Zhao Heming <heming.zhao@suse.com>
AuthorDate:    Mon Jun 1 12:22:15 2020 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Mon Jun 1 12:22:15 2020 -0500

Change dev->bcache_fd default value from 0 to -1

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 6af559cab..c3f7c49be 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;



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-01 21:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-01 21:08 master - Change dev->bcache_fd default value from 0 to -1 David Teigland

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.