mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-25 21:57:45 +03:00
Check no fs mounted before deactivating.
This commit is contained in:
parent
e8fad838b9
commit
0cf96f33ea
@ -428,6 +428,12 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s)
|
|||||||
if (!info.exists)
|
if (!info.exists)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (info.open_count) {
|
||||||
|
log_error("LV %s/%s in use: not removing", lv->vg->name,
|
||||||
|
lv->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
memlock_inc();
|
memlock_inc();
|
||||||
r = _lv_deactivate(lv);
|
r = _lv_deactivate(lv);
|
||||||
memlock_dec();
|
memlock_dec();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user