1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

devices: fix reopen for unopened device

If there's a request to reopen rw a device that's not
open, then just call the normal open function.
This commit is contained in:
David Teigland 2020-09-25 11:59:49 -05:00
parent 8952dcbff0
commit 890c7ef451

View File

@ -1460,7 +1460,8 @@ int label_scan_reopen_rw(struct device *dev)
dev_name(dev), dev->bcache_fd, dev->bcache_di);
return 0;
}
goto do_open;
dev->flags |= DEV_BCACHE_WRITE;
return _scan_dev_open(dev);
}
if ((dev->flags & DEV_BCACHE_WRITE))
@ -1477,7 +1478,6 @@ int label_scan_reopen_rw(struct device *dev)
return 0;
}
do_open:
flags |= O_DIRECT;
flags |= O_NOATIME;
flags |= O_RDWR;