1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00

Check no fs mounted before deactivating.

This commit is contained in:
Alasdair Kergon 2003-10-21 22:00:36 +00:00
parent e8fad838b9
commit 0cf96f33ea

View File

@ -428,6 +428,12 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s)
if (!info.exists)
return 1;
if (info.open_count) {
log_error("LV %s/%s in use: not removing", lv->vg->name,
lv->name);
return 0;
}
memlock_inc();
r = _lv_deactivate(lv);
memlock_dec();