mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix open RO->RW promotions.
This commit is contained in:
parent
56c282920c
commit
349216a6b5
@ -1,5 +1,6 @@
|
||||
Version 2.02.01 -
|
||||
====================================
|
||||
Fix open RO->RW promotion.
|
||||
Fix missing vg_revert in lvcreate error path.
|
||||
|
||||
Version 2.02.00 - 10th November 2005
|
||||
|
@ -418,7 +418,6 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
|
||||
((fstat(dev->fd, &buf) < 0) || (buf.st_rdev != dev->dev))) {
|
||||
log_error("%s: fstat failed: Has device name changed?", name);
|
||||
dev_close_immediate(dev);
|
||||
dev->open_count = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -509,11 +508,9 @@ static int _dev_close(struct device *dev, int immediate)
|
||||
if (dev->open_count > 0)
|
||||
dev->open_count--;
|
||||
|
||||
if (immediate && dev->open_count) {
|
||||
if (immediate && dev->open_count)
|
||||
log_debug("%s: Immediate close attempt while still referenced",
|
||||
dev_name(dev));
|
||||
dev->open_count = 0;
|
||||
}
|
||||
|
||||
/* Close unless device is known to belong to a locked VG */
|
||||
if (immediate ||
|
||||
|
Loading…
Reference in New Issue
Block a user