1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-21 02:50:41 +03:00

Revert wrong fix for nolock locking missing fs_unlock

Patch was wrond and introduced recursive lock_vol
Reverting it.
This commit is contained in:
Zdenek Kabelac 2011-02-02 13:34:00 +00:00
parent 4ae7c94196
commit 197d68a4d0
3 changed files with 2 additions and 4 deletions

View File

@ -217,6 +217,7 @@ static int lock_vg(struct local_client *client)
if (lkid == 0)
return EINVAL;
lvm_do_fs_unlock(); /* Wait for devices */
status = sync_unlock(lockname, lkid);
if (status)
status = errno;

View File

@ -215,6 +215,7 @@ static int _lock_file(const char *file, uint32_t flags)
state = 'W';
break;
case LCK_UNLOCK:
fs_unlock(); /* Wait until devices are available */
return _release_lock(file, 1);
default:
log_error("Unrecognised lock type: %d", flags & LCK_TYPE_MASK);

View File

@ -442,10 +442,6 @@ int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags)
/* If LVM1 driver knows about the VG, it can't be accessed. */
if (!check_lvm1_vg_inactive(cmd, vol))
return_0;
/* Before unlocking VG wait until devices are available. */
if ((flags & LCK_TYPE_MASK) == LCK_UNLOCK)
sync_local_dev_names(cmd);
break;
case LCK_LV:
/* All LV locks are non-blocking. */